Skip to content

Commit

Permalink
Fix scaffolder stub files for PSR4 (#334)
Browse files Browse the repository at this point in the history
* Fixing scaffolder configuration

* One more psrClassName
  • Loading branch information
srtfisher authored Mar 20, 2024
1 parent cc89d57 commit a3a094f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .scaffolder/plugin-feature/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ files:
destination: src/features/{{ wpClassFilename inputs.featureName }}
- source: test.php.hbs
if: "{{ inputs.tests }}"
destination: tests/Features/{{ psrClassFilename inputs.featureName suffix="Test.php" }}
destination: tests/Features/{{ psr4ClassFilename inputs.featureName suffix="Test.php" }}
6 changes: 3 additions & 3 deletions .scaffolder/plugin-feature/test.php.hbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* {{ psrClassName name }} test class file
* {{ psr4ClassName name }} test class file
*
* @package create-wordpress-plugin
*/
Expand All @@ -11,11 +11,11 @@ use Create_WordPress_Plugin\Tests\TestCase;
use Create_WordPress_Plugin\\{{ wpNamespace inputs.featureName prefix="Features" }}\\{{ wpClassName inputs.featureName }};

/**
* {{ replace (psrClassName inputs.featureName) "_" " " }} Test for the {{ wpClassName inputs.featureName }} class.
* {{ replace (psr4ClassName inputs.featureName) "_" " " }} Test for the {{ wpClassName inputs.featureName }} class.
*
* @link https://mantle.alley.com/docs/testing
*/
class {{ psrClassName inputs.featureName suffix="Test" }} extends TestCase {
class {{ psr4ClassName inputs.featureName suffix="Test" }} extends TestCase {
/**
* An example test for the feature.
*/
Expand Down

0 comments on commit a3a094f

Please sign in to comment.