Skip to content

Commit

Permalink
Add support for PHPUnit 11
Browse files Browse the repository at this point in the history
  • Loading branch information
olivervogel committed Nov 2, 2024
1 parent 2ef57d7 commit 3295e4b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"illuminate/translation": "^6|^7|^8|^9|^10|^11"
},
"require-dev": {
"phpunit/phpunit": "^10.0",
"phpunit/phpunit": "^10.0 || ^11.0",
"phpstan/phpstan": "^1",
"squizlabs/php_codesniffer": "^3.8",
"slevomat/coding-standard": "~8.0"
Expand Down
14 changes: 11 additions & 3 deletions tests/AbstractZodiacTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ final class AbstractZodiacTest extends TestCase
{
public function testMatch(): void
{
$zodiac = $this->getMockForAbstractClass(AbstractZodiac::class);
$zodiac = $this->zodiac();
$zodiac->start = ['month' => '6', 'day' => '1'];
$zodiac->end = ['month' => '6', 'day' => '10'];

Expand All @@ -24,17 +24,25 @@ public function testMatch(): void

public function testLocalized(): void
{
$zodiac = $this->getMockForAbstractClass(AbstractZodiac::class);
$zodiac = $this->zodiac();
$zodiac->name = 'gemini';

$this->assertEquals('Gemini', $zodiac->localized());
}

public function testToString(): void
{
$zodiac = $this->getMockForAbstractClass(AbstractZodiac::class);
$zodiac = $this->zodiac();
$zodiac->name = 'mock';

$this->assertEquals('mock', strval($zodiac));
}

private function zodiac(): AbstractZodiac
{
return new class () extends AbstractZodiac
{
//
};
}
}

0 comments on commit 3295e4b

Please sign in to comment.