Skip to content

Commit db45697

Browse files
committed
Check extra condition to decide if a test was skipped
It seems that this could happen with PHPUnit 10, then tearDown() would crash when calling `clear()` on null, but then PHPUnit 10 did not show that exception.
1 parent 2d90917 commit db45697

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/Tests/OrmFunctionalTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ protected function tearDown(): void
540540
$conn = static::$sharedConn;
541541

542542
// In case test is skipped, tearDown is called, but no setup may have run
543-
if (! $conn) {
543+
if (! $conn || ! isset($this->_em)) {
544544
return;
545545
}
546546

0 commit comments

Comments
 (0)