You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the #[Depends('xxx')] attribute, or @depends xxx annotation, tests are getting skipped when the original test fails, but are not getting executed when the test succeeds.
Current behavior
Tests are skipped when the origin function fails, but are not executed when it succeeds. It also does not appear in the "skipped" list
PHPUnit 10.5.19 by Sebastian Bergmann and contributors.
Runtime: PHP 8.2.18
Configuration: /Users/anna.damm/Projects/test/phpunit.xml.dist
.FS 3 / 3 (100%)
Time: 00:00.033, Memory: 10.00 MB
There was 1 failure:
1) DependTest::testDoesNotWork
Failed asserting that false is true.
/Users/anna.damm/Projects/test/DependTest.php:17
--
There was 1 skipped test:
1) DependTest::testDependsOnDoesNotWorks
This test depends on "DependTest::testDoesNotWork" to pass
FAILURES!
Tests: 3, Assertions: 2, Failures: 1, Skipped: 1.
With this test case, the "testDependsOnWorks" is not executed. Tests are:
testWorks -> gets executed successfully
testDoesNotWork -> fails
testDependsOnWorks -> is not executed
testDependsOnDoesNotWorks -> is skipped because of failed dependency
Expected behavior
Test functions with #[Depends(...)] or @depends xxx should be executed when the function they depend on are executed successfully
Summary
When using the
#[Depends('xxx')]
attribute, or@depends xxx
annotation, tests are getting skipped when the original test fails, but are not getting executed when the test succeeds.Current behavior
Tests are skipped when the origin function fails, but are not executed when it succeeds. It also does not appear in the "skipped" list
How to reproduce
execution:
output:
With this test case, the "testDependsOnWorks" is not executed. Tests are:
testWorks -> gets executed successfully
testDoesNotWork -> fails
testDependsOnWorks -> is not executed
testDependsOnDoesNotWorks -> is skipped because of failed dependency
Expected behavior
Test functions with
#[Depends(...)]
or@depends xxx
should be executed when the function they depend on are executed successfullyThis refers to sebastianbergmann/phpunit#5826
The text was updated successfully, but these errors were encountered: