Skip to content

Commit 53cb0cf

Browse files
Do not skip execution of test that depends on a test that is larger than itself
1 parent a9336f4 commit 53cb0cf

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

ChangeLog-10.5.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
All notable changes of the PHPUnit 10.5 release series are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles.
44

5+
## [10.5.43] - 2025-MM-DD
6+
7+
### Changed
8+
9+
* Do not skip execution of test that depends on a test that is larger than itself
10+
511
## [10.5.42] - 2025-01-28
612

713
### Fixed
@@ -383,6 +389,7 @@ All notable changes of the PHPUnit 10.5 release series are documented in this fi
383389

384390
* [#5563](https://github.com/sebastianbergmann/phpunit/issues/5563): `createMockForIntersectionOfInterfaces()` does not automatically register mock object for expectation verification
385391

392+
[10.5.43]: https://github.com/sebastianbergmann/phpunit/compare/10.5.42...10.5
386393
[10.5.42]: https://github.com/sebastianbergmann/phpunit/compare/10.5.41...10.5.42
387394
[10.5.41]: https://github.com/sebastianbergmann/phpunit/compare/10.5.40...10.5.41
388395
[10.5.40]: https://github.com/sebastianbergmann/phpunit/compare/10.5.39...10.5.40

src/Framework/TestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1650,7 +1650,7 @@ private function handleDependencies(): bool
16501650
'This test depends on a test that is larger than itself',
16511651
);
16521652

1653-
return false;
1653+
return true;
16541654
}
16551655

16561656
$returnValue = $passedTests->returnValue($dependencyTarget);

tests/end-to-end/event/risky-depends-on-larger-test.phpt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ Test Suite Finished (PHPUnit\TestFixture\Event\RiskyBecauseDependencyOnLargerTes
2929
Test Suite Started (PHPUnit\TestFixture\Event\RiskyBecauseDependencyOnLargerTest\SmallTest, 1 test)
3030
Test Considered Risky (PHPUnit\TestFixture\Event\RiskyBecauseDependencyOnLargerTest\SmallTest::testOne)
3131
This test depends on a test that is larger than itself
32+
Test Preparation Started (PHPUnit\TestFixture\Event\RiskyBecauseDependencyOnLargerTest\SmallTest::testOne)
33+
Test Prepared (PHPUnit\TestFixture\Event\RiskyBecauseDependencyOnLargerTest\SmallTest::testOne)
34+
Assertion Succeeded (Constraint: is true, Value: true)
35+
Test Passed (PHPUnit\TestFixture\Event\RiskyBecauseDependencyOnLargerTest\SmallTest::testOne)
36+
Test Finished (PHPUnit\TestFixture\Event\RiskyBecauseDependencyOnLargerTest\SmallTest::testOne)
3237
Test Suite Finished (PHPUnit\TestFixture\Event\RiskyBecauseDependencyOnLargerTest\SmallTest, 1 test)
3338
Test Suite Finished (CLI Arguments, 2 tests)
3439
Test Runner Execution Finished

0 commit comments

Comments
 (0)