Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix scaffolder stub files for PSR4 #334

Merged
merged 2 commits into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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