Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/NotMatchedRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
[
Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/SeeAllRequestWereMatchedTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions tests/Integration/SeeMockRequestWasCalledTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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');
Expand Down
7 changes: 4 additions & 3 deletions tests/Integration/SeeMockRequestWasNotCalledTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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');
Expand All @@ -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');
Expand Down
Loading