fix(nx): exclude abstract test base classes from Nx integration test suite#381
Merged
rhoerr merged 1 commit intoMay 27, 2026
Conversation
…setup time PHPUnit 12 emits a runner warning for every abstract class whose filename ends in Test.php, causing exit code 2 which Nx treats as failure even when all real tests pass. At setup time, use find to discover all Abstract*Test.php / *AbstractTest.php files in the testsuite directory and inject <exclude> entries into phpunit.xml.dist for the Magento Integration Tests Real Suite. This mirrors the find-based filter added to the full-suite workflow in mage-os#375. The patched phpunit.xml.dist is included in the project cache so all matrix runners pick it up without repeating the work.
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #375, porting the same fix to the Nx integration test setup.
PHPUnit 12 emits a runner warning for every abstract class whose filename ends in
Test.php, causing exit code 2 which Nx treats as failure even when all real tests pass. This was surfaced while working on mage-os/mageos-magento2#213.At setup time,
finddiscovers allAbstract*Test.php/*AbstractTest.phpfiles in the testsuite directory andawkinjects<exclude>entries intophpunit.xml.distfor theMagento Integration Tests Real Suite. The patched file is saved into the project cache so all matrix runners pick it up without repeating the work.Test plan