Relax phpunit version requirements and don't use phpunit v9 specific methods

This commit is contained in:
Chris Kankiewicz
2020-11-25 13:21:05 -07:00
parent 8010fa4195
commit bd62153a7c
3 changed files with 5 additions and 5 deletions

View File

@@ -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"

View File

@@ -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());
}
}

View File

@@ -33,6 +33,6 @@ class TemporaryFileTest extends TestCase
unset($tempFile);
$this->assertFileDoesNotExist($filePath);
$this->assertFalse(is_file($filePath));
}
}