We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f48c9c2 commit dd0446cCopy full SHA for dd0446c
tests/FunctionalTestCase.php
@@ -17,6 +17,7 @@
17
use MongoDB\Operation\DatabaseCommand;
18
use MongoDB\Operation\ListCollections;
19
use stdClass;
20
+use Throwable;
21
use UnexpectedValueException;
22
23
use function array_intersect_key;
@@ -69,12 +70,15 @@ public function setUp(): void
69
70
$this->configuredFailPoints = [];
71
}
72
- public function tearDown(): void
73
+ protected function onNotSuccessfulTest(Throwable $t): never
74
{
- if (! $this->hasFailed()) {
75
- $this->cleanupCollections();
76
- }
+ $this->cleanupCollections();
+
77
+ throw $t;
78
+ }
79
80
+ public function tearDown(): void
81
+ {
82
$this->disableFailPoints();
83
84
parent::tearDown();
0 commit comments