diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5bd4790..fc3fe54 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php: [8.1,8.2,8.3] + php: [8.2,8.3,8.4] steps: - uses: actions/checkout@v2 - uses: shivammathur/setup-php@v2 diff --git a/composer.json b/composer.json index 95d1f4a..f11357c 100644 --- a/composer.json +++ b/composer.json @@ -11,8 +11,8 @@ } ], "require": { - "illuminate/contracts": "^5.0|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0", - "illuminate/support": "^4.0|^5.0|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0" + "illuminate/contracts": "^5.0|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0|^13.0", + "illuminate/support": "^4.0|^5.0|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0|^13.0" }, "require-dev": { "php-coveralls/php-coveralls": "*", diff --git a/phpunit.xml b/phpunit.xml index ec9d395..9af29a3 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,5 +1,5 @@ - + diff --git a/tests/ModelTest.php b/tests/ModelTest.php index a2cec0b..11bc11d 100644 --- a/tests/ModelTest.php +++ b/tests/ModelTest.php @@ -223,14 +223,17 @@ public function testGuarded() public function testGuardedCallback() { ModelStub::unguard(); - $mock = $this->getMockBuilder('stdClass') - ->addMethods(['callback']) - ->getMock(); - $mock->expects($this->once()) - ->method('callback') - ->willReturn('foo'); - $string = ModelStub::unguarded([$mock, 'callback']); + $callbackTarget = new class { + public int $callCount = 0; + public function callback(): string + { + $this->callCount++; + return 'foo'; + } + }; + $string = ModelStub::unguarded([$callbackTarget, 'callback']); $this->assertEquals('foo', $string); + $this->assertSame(1, $callbackTarget->callCount); ModelStub::reguard(); }