diff --git a/composer.json b/composer.json index b757728..f15dac3 100644 --- a/composer.json +++ b/composer.json @@ -38,7 +38,7 @@ "phpstan/extension-installer": "^1.3", "phpstan/phpstan": "^1.10", "phpstan/phpstan-phpunit": "^1.3", - "phpunit/phpunit": "^7.5.20 || ^8.0 || ^9.0", + "phpunit/phpunit": "^9.6.15", "symfony/var-dumper": "^3.3 || ^4.0 || ^5.0" }, "minimum-stability": "stable", diff --git a/phpunit.xml.dist b/phpunit.xml.dist index b5f06ea..8fef3e9 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,8 +1,9 @@ + @@ -13,11 +14,11 @@ - - + + ./src - - + + diff --git a/tests/unit/Http/RequestManagerTest.php b/tests/unit/Http/RequestManagerTest.php index 9ba1dc3..f1e7ee4 100644 --- a/tests/unit/Http/RequestManagerTest.php +++ b/tests/unit/Http/RequestManagerTest.php @@ -45,7 +45,7 @@ public function shouldSendAndDecodeRequest(): void // Assert properties of the send request $recordedRequests = $mockClient->getRequests(); $this->assertCount(1, $recordedRequests); - $this->assertRegExp( + $this->assertMatchesRegularExpression( '~https\://account\-id\.matej\.lmc\.cz/foo/endpoint\?hmac_timestamp\=[0-9]+&hmac_sign\=[[:alnum:]]~', $recordedRequests[0]->getUri()->__toString() ); diff --git a/tests/unit/Http/ResponseDecoderTest.php b/tests/unit/Http/ResponseDecoderTest.php index 9a2e70a..3dac0a5 100644 --- a/tests/unit/Http/ResponseDecoderTest.php +++ b/tests/unit/Http/ResponseDecoderTest.php @@ -111,8 +111,8 @@ public function shouldDecodeRecommendationResponse(): void $this->assertContainsOnlyInstancesOf(\stdClass::class, $decodedResponse->getRecommendation()->getData()); foreach ($decodedResponse->getRecommendation()->getData() as $recommendedItem) { - $this->assertObjectHasAttribute('item_id', $recommendedItem); - $this->assertObjectHasAttribute('item_url', $recommendedItem); + $this->assertObjectHasProperty('item_id', $recommendedItem); + $this->assertObjectHasProperty('item_url', $recommendedItem); } } }