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

allow suite to have exclude in any order with directory and file #4958

Conversation

drealecs
Copy link
Sponsor Contributor

After upgrading from 6.5 to 7.5, few warning was visible for phpunit.xml schema validation each time phpunit was run.

  - Element 'directory': This element is not expected. Expected is ( exclude ).

and

  - Element 'file': This element is not expected. Expected is ( exclude ).

Having exclude tags interline with directory or file helps keeping things organized in a suite. Example:

<testsuite name="integration-without-db">
    <directory>test-integration/lib/Marketplace</directory>
    <exclude>test-integration/lib/Marketplace/WebService</exclude>

    <directory>test-integration/lib/Merchant</directory>
    
    <directory>test-integration/lib/MerchantToken</directory>
    <exclude>test-integration/lib/MerchantToken/MerchantTokenApiTest.php</exclude>

    <file>test-integration/lib/AdminIntegrationTest.php</file>
</testsuite>

@drealecs drealecs force-pushed the allow_exclude_after_directory branch from 4c191eb to 6120bb1 Compare April 10, 2022 05:00
@drealecs drealecs changed the base branch from master to 9.5 April 10, 2022 05:00
@drealecs
Copy link
Sponsor Contributor Author

This can be rebased/cherry-picked for 8.5 branch as well for schema definition change. Let me know how you want to proceed.

@drealecs drealecs changed the title allow in suite to have exclude in any order with directory and file allow suite to have exclude in any order with directory and file Apr 10, 2022
@sebastianbergmann
Copy link
Owner

Please send this against 8.5. Thanks!

@drealecs
Copy link
Sponsor Contributor Author

Initial issue #3248 was fixed for any directory/file arrangements in general and also for exclude usage in filter>whitelist

@drealecs drealecs force-pushed the allow_exclude_after_directory branch from 6120bb1 to 6cf9445 Compare April 10, 2022 05:27
@drealecs drealecs changed the base branch from 9.5 to 8.5 April 10, 2022 05:27
@drealecs
Copy link
Sponsor Contributor Author

drealecs commented Apr 10, 2022

Please send this against 8.5. Thanks!

Done.
Opened a separate MR for the second commit that was initially included here, a very small optimization that I noticed when reading code to make sure the order is definitely not relevant: #4959

@codecov
Copy link

codecov bot commented Apr 10, 2022

Codecov Report

Merging #4958 (6cf9445) into 8.5 (690d0c7) will increase coverage by 83.96%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             8.5    #4958       +/-   ##
==========================================
+ Coverage       0   83.96%   +83.96%     
- Complexity     0     4610     +4610     
==========================================
  Files          0      272      +272     
  Lines          0    11464    +11464     
==========================================
+ Hits           0     9626     +9626     
- Misses         0     1838     +1838     
Impacted Files Coverage Δ
src/Framework/MockObject/ConfigurableMethod.php 72.72% <0.00%> (ø)
src/Util/PHP/AbstractPhpProcess.php 74.07% <0.00%> (ø)
...ect/Exception/MethodNameNotConfiguredException.php 0.00% <0.00%> (ø)
...ation/Migration/Migrations/CoveragePhpToReport.php 100.00% <0.00%> (ø)
...rc/Framework/Constraint/Operator/UnaryOperator.php 94.28% <0.00%> (ø)
src/Runner/Version.php 84.61% <0.00%> (ø)
src/Util/Annotation/Registry.php 100.00% <0.00%> (ø)
...ct/Exception/MethodCannotBeConfiguredException.php 0.00% <0.00%> (ø)
src/TextUI/XmlConfiguration/Logging/Text.php 100.00% <0.00%> (ø)
.../TextUI/XmlConfiguration/Group/GroupCollection.php 73.33% <0.00%> (ø)
... and 262 more

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@sebastianbergmann sebastianbergmann merged commit eef408a into sebastianbergmann:8.5 Apr 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants