Skip to content

Commit

Permalink
#2407 - Adjust tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeckerson committed Sep 10, 2023
1 parent 90c9d4c commit 2d95cf0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/Extension/Interfaces/InterfaceMethodSignatureTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ public function testImplementInterfaceInMethodSignature(): void
public function testImplementInterfaceInMethodSignatureInt(): void
{
$this->expectException(\TypeError::class);
if (version_compare(PHP_VERSION, '8.2.0', '<=')) {
$this->expectExceptionMessageMatches('/must be of (the\s)?type int, bool given/');
} else {
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/');
}

(new ImplementInt())->set(true);
Expand All @@ -44,13 +44,13 @@ public function testImplementInterfaceInMethodSignatureInt(): void
public function testImplementInterfaceInMethodSignatureInterface(): void
{
$this->expectException(\TypeError::class);
if (version_compare(PHP_VERSION, '8.2.0', '<=')) {
if (version_compare(PHP_VERSION, '8.3.0beta3', '>=')) {
$this->expectExceptionMessageMatches(
'/(must be of type|implement interface) Stub\\\\Interfaces\\\\InterfaceInt, bool given/'
'/(must be of type) Stub\\\\Interfaces\\\\InterfaceInt, true given/'
);
} else {
$this->expectExceptionMessageMatches(
'/(must be of type) Stub\\\\Interfaces\\\\InterfaceInt, true given/'
'/(must be of type|implement interface) Stub\\\\Interfaces\\\\InterfaceInt, bool given/'
);
}

Expand Down

0 comments on commit 2d95cf0

Please sign in to comment.