Skip to content

Commit 8f0c6d0

Browse files
committed
Remove usage of onNotSuccessfulTest to mark tests as skipped
Tests are not marked as skipped automatically anymore when an UnsupportedDriverActionException is caught. Instead, drivers should configure their unsupported tests properly in their testsuite config. PHPUnit 10 removed support for changing the test outcome in the onNotSuccessfulTest method of the TestCase so the previous solution will not work anymore in the future.
1 parent dedf292 commit 8f0c6d0

1 file changed

Lines changed: 0 additions & 10 deletions

File tree

tests/TestCase.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -71,16 +71,6 @@ protected function resetSessions()
7171
}
7272
}
7373

74-
protected function onNotSuccessfulTest(\Throwable $e): void
75-
{
76-
if ($e instanceof UnsupportedDriverActionException) {
77-
@trigger_error(sprintf('Relying on catching "UnsupportedDriverActionException" to mark tests as skipped is deprecated. The test "%s::%s" should be marked as skipped through the test config.', get_class($this), $this->getName(false)), E_USER_DEPRECATED);
78-
$this->markTestSkipped($e->getMessage());
79-
}
80-
81-
parent::onNotSuccessfulTest($e);
82-
}
83-
8474
/**
8575
* Returns session.
8676
*

0 commit comments

Comments
 (0)