diff --git a/tests/_files/DependencyFailureTest.php b/tests/_files/DependencyFailureTest.php index 4695305d73d..39a9a379714 100644 --- a/tests/_files/DependencyFailureTest.php +++ b/tests/_files/DependencyFailureTest.php @@ -39,4 +39,16 @@ public function testFour(): void { $this->assertTrue(true); } + + /** + * This test has been added to check the printed warnings for the user + * when a dependency simply doesn't exist. + * + * @depends doesNotExist + * @see https://github.com/sebastianbergmann/phpunit/issues/3517 + */ + public function testHandlesDependsAnnotationForNonexistentTests(): void + { + $this->assertTrue(true); + } } diff --git a/tests/end-to-end/dependencies-isolation.phpt b/tests/end-to-end/dependencies-isolation.phpt index 88c0808b03c..acae771a678 100644 --- a/tests/end-to-end/dependencies-isolation.phpt +++ b/tests/end-to-end/dependencies-isolation.phpt @@ -15,7 +15,7 @@ PHPUnit %s by Sebastian Bergmann and contributors. Runtime: %s -...FSSS 7 / 7 (100%) +...FSSSS 8 / 8 (100%) Time: %s, Memory: %s @@ -27,7 +27,7 @@ There was 1 failure: -- -There were 3 skipped tests: +There were 4 skipped tests: 1) DependencyFailureTest::testTwo This test depends on "DependencyFailureTest::testOne" to pass. @@ -38,5 +38,8 @@ This test depends on "DependencyFailureTest::testTwo" to pass. 3) DependencyFailureTest::testFour This test depends on "DependencyFailureTest::testOne" to pass. +4) DependencyFailureTest::testHandlesDependsAnnotationForNonexistentTests +This test depends on "DependencyFailureTest::doesNotExist" which does not exist + FAILURES! -Tests: 7, Assertions: 4, Failures: 1, Skipped: 3. +Tests: 8, Assertions: 4, Failures: 1, Skipped: 4. diff --git a/tests/end-to-end/dependencies.phpt b/tests/end-to-end/dependencies.phpt index 8fab9884d24..e0b141c2bb9 100644 --- a/tests/end-to-end/dependencies.phpt +++ b/tests/end-to-end/dependencies.phpt @@ -14,7 +14,7 @@ PHPUnit %s by Sebastian Bergmann and contributors. Runtime: %s -...FSSS 7 / 7 (100%) +...FSSSS 8 / 8 (100%) Time: %s, Memory: %s @@ -26,7 +26,7 @@ There was 1 failure: -- -There were 3 skipped tests: +There were 4 skipped tests: 1) DependencyFailureTest::testTwo This test depends on "DependencyFailureTest::testOne" to pass. @@ -37,5 +37,8 @@ This test depends on "DependencyFailureTest::testTwo" to pass. 3) DependencyFailureTest::testFour This test depends on "DependencyFailureTest::testOne" to pass. +4) DependencyFailureTest::testHandlesDependsAnnotationForNonexistentTests +This test depends on "DependencyFailureTest::doesNotExist" which does not exist + FAILURES! -Tests: 7, Assertions: 4, Failures: 1, Skipped: 3. +Tests: 8, Assertions: 4, Failures: 1, Skipped: 4.