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

Improve tests structure #1000

Merged
merged 6 commits into from
Sep 17, 2023
Merged

Improve tests structure #1000

merged 6 commits into from
Sep 17, 2023

Conversation

GaryJones
Copy link
Contributor

Improve the state of the tests structure.

Tests: Use FQCN references

This is in preparation for test files to have namespaces.

Tests: Use PSR-4 filenames for test classes

As of PHPUnit 9.1.0, support for test file names which do not match the class name of the test class within, is deprecated. Support is expected to be removed completely in a future PHPUnit version. Effectively, this means that PHPUnit expects PSR4 to be followed for test classes.

Tests: Add namespaces and rename TestCase

Tests: Move into Integration directory

Allows a future split out of Unit tests.

Tests: Fix invalid covers annotations

There are other @covers annotations that are either missing or a slightly different format (no leading slash, presence of parentheses) which is not covered here.

Tests: Refresh PHPUnit config to add coverage

Coverage not added to CI yet as the @covers annotations need reviewing and the tests also need reviewing.

This is in preparation for test files to have namespaces.
As of PHPUnit 9.1.0, support for test file names which do not match the class name of the test class within, is deprecated. Support is expected to be removed completely in a future PHPUnit version. Effectively, this means that PHPUnit expects PSR4 to be followed for test classes.
Allows a future split out of Unit tests.
There are other `@covers` annotations that are either missing or a slightly different format (no leading slash, presence of parentheses) which is not covered here.
@GaryJones GaryJones added this to the 3.5.16 milestone Sep 17, 2023
@GaryJones GaryJones self-assigned this Sep 17, 2023
@GaryJones GaryJones merged commit 17c5e9f into develop Sep 17, 2023
15 checks passed
@GaryJones GaryJones deleted the fix/tests-structure branch September 17, 2023 21:35
@alecgeatches alecgeatches mentioned this pull request Apr 12, 2024
@alecgeatches alecgeatches modified the milestones: 3.5.16, 3.6 Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants