diff --git a/tests/Extension/Interfaces/InterfaceMethodSignatureTest.php b/tests/Extension/Interfaces/InterfaceMethodSignatureTest.php index 2d41ad99c..62661e30d 100644 --- a/tests/Extension/Interfaces/InterfaceMethodSignatureTest.php +++ b/tests/Extension/Interfaces/InterfaceMethodSignatureTest.php @@ -32,11 +32,7 @@ public function testImplementInterfaceInMethodSignature(): void public function testImplementInterfaceInMethodSignatureInt(): void { $this->expectException(\TypeError::class); - if (version_compare(PHP_VERSION, '8.3.0beta3', '>=')) { - $this->expectExceptionMessageMatches('/must be of type int, true given/'); - } else { - $this->expectExceptionMessageMatches('/must be of (the\s)?type int, bool given/'); - } + $this->expectExceptionMessageMatches('/must be of type int, (true|bool) given/'); (new ImplementInt())->set(true); } @@ -44,15 +40,9 @@ public function testImplementInterfaceInMethodSignatureInt(): void public function testImplementInterfaceInMethodSignatureInterface(): void { $this->expectException(\TypeError::class); - if (version_compare(PHP_VERSION, '8.3.0beta3', '>=')) { - $this->expectExceptionMessageMatches( - '/(must be of type) Stub\\\\Interfaces\\\\InterfaceInt, true given/' - ); - } else { - $this->expectExceptionMessageMatches( - '/(must be of type|implement interface) Stub\\\\Interfaces\\\\InterfaceInt, bool given/' - ); - } + $this->expectExceptionMessageMatches( + '/(must be of type) Stub\\\\Interfaces\\\\InterfaceInt, (true|bool) given/' + ); (new ImplementInterface())->getVoid(true); }