Skip to content

Commit

Permalink
Fix racing issue in Testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
rougin committed Nov 28, 2023
1 parent 1411036 commit 10265ef
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions tests/Testcase.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,13 @@ class Testcase extends Legacy
{
public function setExpectedException($exception)
{
/** @var callable */
$class = array($this, 'setExpectedException');

if (method_exists($this, 'expectException'))
{
/** @var callable */
$class = array($this, 'expectException');
$this->expectException($exception);
}
else
{
parent::setExpectedException($exception);
}

call_user_func($class, $exception);
}
}

0 comments on commit 10265ef

Please sign in to comment.