Skip to content

Commit

Permalink
Destroy TestCase object after its test was run
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Jun 12, 2024
1 parent 778070d commit f11b51a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Framework/TestSuite.php
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,14 @@ public function run(): void
}

$test->run();

foreach (array_keys($this->tests) as $key) {
if ($test === $this->tests[$key]) {
unset($this->tests[$key]);

break;
}
}
}

$this->invokeMethodsAfterLastTest($emitter);
Expand Down

0 comments on commit f11b51a

Please sign in to comment.