Skip to content

Commit

Permalink
require PHPUnit 10.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mhujer committed Apr 20, 2023
1 parent e1b2e34 commit ea07ff3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"require": {
"php": "~8.1",
"consistence-community/consistence": "~2.1",
"phpunit/phpunit": "^9.3"
"phpunit/phpunit": "^10.1"
},
"require-dev": {
"consistence-community/coding-standard": "3.11.2",
Expand Down
8 changes: 4 additions & 4 deletions tests/EnumAssertNativeEnumTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ public function testComparingTwoSimilarEnumValuesWork(): void
public function testAssertSameEnumFailsIfActualValueIsNotAnEnum(): void
{
$this->expectException(\PHPUnit\Framework\ExpectationFailedException::class);
$this->expectExceptionMessage('Failed asserting that \'foobar\' is an instance of interface "BackedEnum".');
$this->expectExceptionMessage('Failed asserting that \'foobar\' is an instance of interface BackedEnum.');

EnumAssert::assertSame(CardColorNative::RED, 'foobar');
}

public function testAssertSameEnumFailsIfExpectedValueIsNotAnEnum(): void
{
$this->expectException(\PHPUnit\Framework\ExpectationFailedException::class);
$this->expectExceptionMessage('Failed asserting that \'foobar2\' is an instance of interface "BackedEnum".');
$this->expectExceptionMessage('Failed asserting that \'foobar2\' is an instance of interface BackedEnum.');

EnumAssert::assertSame('foobar2', CardColorNative::BLACK);
}
Expand All @@ -38,10 +38,10 @@ public function testAssertSameEnumFailsIfTheEnumsAreNotSame(): void
}


public function testComparingNativeEnumWithConsisteneEnum(): void
public function testComparingNativeEnumWithConsistenceEnum(): void
{
$this->expectException(\PHPUnit\Framework\ExpectationFailedException::class);
$this->expectExceptionMessage('Failed asserting that Mhujer\ConsistencePhpunit\Fixtures\CardColorNative Object (...) is an instance of class "Consistence\Enum\Enum".');
$this->expectExceptionMessage('Failed asserting that Mhujer\ConsistencePhpunit\Fixtures\CardColorNative Enum (RED, \'red\') is an instance of class Consistence\Enum\Enum.');

EnumAssert::assertSame(CardColorNative::RED, CardColor::get(CardColor::BLACK));
}
Expand Down
4 changes: 2 additions & 2 deletions tests/EnumAssertTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ public function testComparingTwoSimilarEnumValuesWork(): void
public function testAssertSameEnumFailsIfActualValueIsNotAnEnum(): void
{
$this->expectException(\PHPUnit\Framework\ExpectationFailedException::class);
$this->expectExceptionMessage('Failed asserting that \'foobar\' is an instance of class "Consistence\Enum\Enum".');
$this->expectExceptionMessage('Failed asserting that \'foobar\' is an instance of class Consistence\Enum\Enum.');

EnumAssert::assertSame(CardColor::get(CardColor::RED), 'foobar');
}

public function testAssertSameEnumFailsIfExpectedValueIsNotAnEnum(): void
{
$this->expectException(\PHPUnit\Framework\ExpectationFailedException::class);
$this->expectExceptionMessage('Failed asserting that \'foobar2\' is an instance of class "Consistence\Enum\Enum".');
$this->expectExceptionMessage('Failed asserting that \'foobar2\' is an instance of class Consistence\Enum\Enum.');

EnumAssert::assertSame('foobar2', CardColor::get(CardColor::BLACK));
}
Expand Down

0 comments on commit ea07ff3

Please sign in to comment.