diff --git a/composer.json b/composer.json index 93414b9..b5a8fc9 100644 --- a/composer.json +++ b/composer.json @@ -38,7 +38,7 @@ "friendsofphp/php-cs-fixer": "^2.3", "johnkary/phpunit-speedtrap": "^3.2", "phlak/coding-standards": "^1.1", - "phpunit/phpunit": "^9.1", + "phpunit/phpunit": "^8.0 || ^9.0", "psy/psysh": "^0.10", "symfony/var-dumper": "^5.0", "vimeo/psalm": "^3.6" diff --git a/tests/Controllers/SearchControllerTest.php b/tests/Controllers/SearchControllerTest.php index 10b3ba4..bad95c4 100644 --- a/tests/Controllers/SearchControllerTest.php +++ b/tests/Controllers/SearchControllerTest.php @@ -30,7 +30,7 @@ class SearchControllerTest extends TestCase $this->assertInstanceOf(ResponseInterface::class, $response); $this->assertEquals(200, $response->getStatusCode()); - $this->assertDoesNotMatchRegularExpression('/No results found/', (string) $response->getBody()); + $this->assertStringNotContainsString('No results found', (string) $response->getBody()); } public function test_it_returns_no_results_found_when_there_are_no_results(): void @@ -49,7 +49,7 @@ class SearchControllerTest extends TestCase $this->assertInstanceOf(ResponseInterface::class, $response); $this->assertEquals(200, $response->getStatusCode()); - $this->assertMatchesRegularExpression('/No results found/', (string) $response->getBody()); + $this->assertStringContainsString('No results found', (string) $response->getBody()); } public function test_it_returns_no_results_found_for_a_blank_search(): void @@ -68,6 +68,6 @@ class SearchControllerTest extends TestCase $this->assertInstanceOf(ResponseInterface::class, $response); $this->assertEquals(200, $response->getStatusCode()); - $this->assertMatchesRegularExpression('/No results found/', (string) $response->getBody()); + $this->assertStringContainsString('No results found', (string) $response->getBody()); } } diff --git a/tests/TemporaryFileTest.php b/tests/TemporaryFileTest.php index 5c2c7c0..3273ef0 100644 --- a/tests/TemporaryFileTest.php +++ b/tests/TemporaryFileTest.php @@ -33,6 +33,6 @@ class TemporaryFileTest extends TestCase unset($tempFile); - $this->assertFileDoesNotExist($filePath); + $this->assertFalse(is_file($filePath)); } }