1
0
mirror of https://github.com/halaxa/json-machine.git synced 2025-01-16 20:48:17 +01:00

dropped compatibility with older phpunit

This commit is contained in:
Filip Halaxa 2024-11-22 13:13:38 +01:00
parent 6b2b6e2320
commit 05dc2eb0fd

View File

@ -16,13 +16,7 @@ class SyntaxErrorExceptionTest extends TestCase
{
$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());
}
}