diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2332953..6f8aba6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,11 +47,11 @@ jobs: experimental: true dependencies: "highest" - php: "8.3" - composer-options: "--ignore-platform-reqs" + composer-options: "" experimental: true dependencies: "highest" - php: "8.4" - composer-options: "--ignore-platform-reqs" + composer-options: "" experimental: true dependencies: "highest" steps: diff --git a/composer.json b/composer.json index 3cf5eb4..c0ea6ed 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,7 @@ "php": "7.4.*||8.*", "guzzlehttp/guzzle": "^7.0", "codeception/codeception": "4.*||5.*", - "phpunit/phpunit": "^8.5 || ^9.0 || ^10.0 || ^11.0 || ^12.0", + "phpunit/phpunit": "^8.5 || ^9.0 || ^10.0 || ^11.0 || ^12.0 || ^13.0", "jfcherng/php-diff": "^6.14" }, "require-dev": { diff --git a/tests/Integration/NotMatchedRequestTest.php b/tests/Integration/NotMatchedRequestTest.php index 6bc1ef4..ddc27a0 100644 --- a/tests/Integration/NotMatchedRequestTest.php +++ b/tests/Integration/NotMatchedRequestTest.php @@ -17,7 +17,7 @@ class NotMatchedRequestTest extends TestCase private function initialize(string $notMatchedRequestConfig): void { - $moduleContainer = $this->createMock(ModuleContainer::class); + $moduleContainer = $this->createStub(ModuleContainer::class); $this->sot = new MockServerHelper( $moduleContainer, [ diff --git a/tests/Integration/SeeAllRequestWereMatchedTest.php b/tests/Integration/SeeAllRequestWereMatchedTest.php index a968554..dccaf2b 100644 --- a/tests/Integration/SeeAllRequestWereMatchedTest.php +++ b/tests/Integration/SeeAllRequestWereMatchedTest.php @@ -16,7 +16,7 @@ class SeeAllRequestWereMatchedTest extends TestCase protected function initialize(string $notMatchedRequest): void { - $moduleContainer = $this->createMock(ModuleContainer::class); + $moduleContainer = $this->createStub(ModuleContainer::class); $config = [ 'url' => getenv('MOCKSERVER_URL'), 'notMatchedRequest' => $notMatchedRequest, diff --git a/tests/Integration/SeeMockRequestWasCalledTest.php b/tests/Integration/SeeMockRequestWasCalledTest.php index 5ee0841..26620fa 100644 --- a/tests/Integration/SeeMockRequestWasCalledTest.php +++ b/tests/Integration/SeeMockRequestWasCalledTest.php @@ -17,7 +17,7 @@ class SeeMockRequestWasCalledTest extends TestCase protected function setUp(): void { parent::setUp(); - $moduleContainer = $this->createMock(ModuleContainer::class); + $moduleContainer = $this->createStub(ModuleContainer::class); $config = [ 'url' => getenv('MOCKSERVER_URL'), 'expectationsPath' => __DIR__ . '/../../docker/mockserver/expectations', @@ -52,7 +52,7 @@ public function testExpectationNotWasCalledThrowException2(): void { $this->expectException(ExpectationFailedException::class); $this->expectExceptionMessage( - 'No expectation found with id not-existing-expectation' . PHP_EOL + 'No expectation found with id not-existing-expectation' . "\n" . 'Failed asserting that 400 matches expected 202.' ); $this->sot->seeMockRequestWasCalled('not-existing-expectation'); diff --git a/tests/Integration/SeeMockRequestWasNotCalledTest.php b/tests/Integration/SeeMockRequestWasNotCalledTest.php index 9943770..1aa1c56 100644 --- a/tests/Integration/SeeMockRequestWasNotCalledTest.php +++ b/tests/Integration/SeeMockRequestWasNotCalledTest.php @@ -20,7 +20,7 @@ protected function setUp(): void 'url' => getenv('MOCKSERVER_URL'), 'expectationsPath' => __DIR__ . '/../../docker/mockserver/expectations', ]; - $moduleContainer = $this->createMock(ModuleContainer::class); + $moduleContainer = $this->createStub(ModuleContainer::class); $this->sot = new MockServerHelper($moduleContainer, $config); $this->sot->_initialize(); $this->sot->_beforeSuite(); @@ -43,7 +43,8 @@ public function testExpectationWasNotCalledButItWasThrowException(): void { $this->expectException(ExpectationFailedException::class); $this->expectExceptionMessageMatches( - '#^Request not found exactly 0 times, expected:((.|\n)*) but was:((.|\n)*)' + '#^Request (?:not found exactly 0 times|found 1 time but should have been found exactly 0 times), ' + . 'expected:((.|\n)*) but was:((.|\n)*)' . 'Failed asserting that 406 matches expected 202\.$#' ); $this->client->request('GET', 'https://jsonplaceholder.typicode.com/posts/2'); @@ -54,7 +55,7 @@ public function testExpectationWasCalledNotExistExpectationThrowException(): voi { $this->expectException(ExpectationFailedException::class); $this->expectExceptionMessage( - 'No expectation found with id not-existing-expectation' . PHP_EOL + 'No expectation found with id not-existing-expectation' . "\n" . 'Failed asserting that 400 matches expected 202.' ); $this->sot->seeMockRequestWasNotCalled('not-existing-expectation');