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

Tests: use PSR-4 #360

Merged
merged 4 commits into from
Nov 20, 2023
Merged

Tests: use PSR-4 #360

merged 4 commits into from
Nov 20, 2023

Conversation

jrfnl
Copy link
Contributor

@jrfnl jrfnl commented Nov 20, 2023

Summary

This PR can be summarized in the following changelog entry:

  • Tests: use PSR-4

Relevant technical choices:

Tests: move mock acf class to Doubles directory

Tests: move unit tests to tests\Unit subdirectory

Tests: rename some mock classes

... to comply with the YoastCS naming conventions.

These weren't being flagged so far as the tests are using a non-conventional directory layout.

Tests: use PSR-4

  • Ensure all test class names reflect the name of the class under test.
  • Ensure all test class file names match the name of the test class.
  • Change the Composer autoload-dev directive to use PSR-4 autoloading.
  • Update the phpunit.xml.dist file to match.
  • Update the .phpcs.xml.dist file to match.

Test instructions

This PR can be tested by following these steps:

  • N/A If the tests pass, we're good.

... to comply with the YoastCS naming conventions.

These weren't being flagged so far as the tests are using a non-conventional directory layout.
* Ensure all test class names reflect the name of the class under test.
* Ensure all test class file names match the name of the test class.
* Change the Composer `autoload-dev` directive to use PSR-4 autoloading.
* Update the `phpunit.xml.dist` file to match.
* Update the `.phpcs.xml.dist` file to match.
@jrfnl jrfnl added yoast cs/qa changelog: non-user-facing Needs to be included in the 'Non-userfacing' category in the changelog labels Nov 20, 2023
@jrfnl jrfnl added this to the 3.2 milestone Nov 20, 2023
@jrfnl jrfnl merged commit a6ef203 into develop Nov 20, 2023
16 checks passed
@jrfnl jrfnl deleted the JRF/tests-use-psr4 branch November 20, 2023 05:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: non-user-facing Needs to be included in the 'Non-userfacing' category in the changelog yoast cs/qa
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant