Skip to content

Commit

Permalink
dropped compatibility with older phpunit
Browse files Browse the repository at this point in the history
  • Loading branch information
halaxa committed Nov 22, 2024
1 parent 6b2b6e2 commit 05dc2eb
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions test/JsonMachineTest/Exception/SyntaxErrorExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,7 @@ public function testMessageContainsDataFromConstructor()
{
$exception = new SyntaxErrorException('msg 42', 24);

$assertMethod = 'assertContains';
/* @phpstan-ignore function.alreadyNarrowedType */
if (method_exists($this, 'assertStringContainsString')) {
$assertMethod = 'assertStringContainsString';
}

$this->$assertMethod('msg 42', $exception->getMessage());
$this->$assertMethod('24', $exception->getMessage());
$this->assertStringContainsString('msg 42', $exception->getMessage());
$this->assertStringContainsString('24', $exception->getMessage());
}
}

0 comments on commit 05dc2eb

Please sign in to comment.