From ca29f44705a059a61289c20f570b73ab7855a3bc Mon Sep 17 00:00:00 2001 From: Sean Fisher Date: Tue, 30 Jan 2024 12:20:05 -0500 Subject: [PATCH] Finishing new stubs --- .scaffolder/feature/config.yml | 2 +- .scaffolder/feature/feature.php.hbs | 2 +- .scaffolder/feature/test.php.hbs | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.scaffolder/feature/config.yml b/.scaffolder/feature/config.yml index 6871c0b0..629a3642 100644 --- a/.scaffolder/feature/config.yml +++ b/.scaffolder/feature/config.yml @@ -13,5 +13,5 @@ files: - source: feature.php.hbs destination: src/features/{{ wpClassFilename inputs.featureName }} - source: test.php.hbs - if: {{ inputs.tests }} + if: "{{ inputs.tests }}" destination: tests/Features/{{ psrClassFilename inputs.featureName suffix="Test.php" }} diff --git a/.scaffolder/feature/feature.php.hbs b/.scaffolder/feature/feature.php.hbs index 6b2014b8..7f705068 100644 --- a/.scaffolder/feature/feature.php.hbs +++ b/.scaffolder/feature/feature.php.hbs @@ -5,7 +5,7 @@ * @package Create_WordPress_Plugin */ -namespace Create_WordPress_Plugin\{{ wpNamespace inputs.featureName prefix="Features" }}; +namespace Create_WordPress_Plugin\\{{ wpNamespace inputs.featureName prefix="Features" }}; use Alley\WP\Types\Feature; diff --git a/.scaffolder/feature/test.php.hbs b/.scaffolder/feature/test.php.hbs index 8f4c51aa..01e45007 100644 --- a/.scaffolder/feature/test.php.hbs +++ b/.scaffolder/feature/test.php.hbs @@ -5,17 +5,17 @@ * @package create-wordpress-plugin */ -namespace Create_WordPress_Plugin\{{ wpNamespace inputs.featureName prefix="Tests\\Features" }}; +namespace Create_WordPress_Plugin\\{{ wpNamespace inputs.featureName prefix="Tests\Features" }}; use Create_WordPress_Plugin\Tests\TestCase; -use Create_WordPress_Plugin\{{ wpNamespace inputs.featureName prefix="Features" }}\{{ wpClassName inputs.featureName }}; +use Create_WordPress_Plugin\\{{ wpNamespace inputs.featureName prefix="Features" }}\\{{ wpClassName inputs.featureName }}; /** * {{ replace (psrClassName inputs.featureName) "_" " " }} Test for the {{ wpClassName inputs.featureName }} class. * * @link https://mantle.alley.com/docs/testing */ -class {{ psrClassName inputs.featureName }} extends TestCase { +class {{ psrClassName inputs.featureName suffix="Test" }} extends TestCase { /** * An example test for the feature. */