upgraded to phpunit 8 (#1155)
This commit is contained in:
@@ -26,14 +26,14 @@ class ApiDocControllerTest extends ControllerBaseTest
|
||||
{
|
||||
$client = $this->getClientForAuthenticatedUser(User::ROLE_USER);
|
||||
$this->assertAccessIsGranted($client, '/api/doc');
|
||||
$this->assertContains('<title>Kimai 2 - API Docs</title>', $client->getResponse()->getContent());
|
||||
$this->assertStringContainsString('<title>Kimai 2 - API Docs</title>', $client->getResponse()->getContent());
|
||||
}
|
||||
|
||||
public function testGetJsonDocs()
|
||||
{
|
||||
$client = $this->getClientForAuthenticatedUser(User::ROLE_USER);
|
||||
$this->assertAccessIsGranted($client, '/api/doc.json');
|
||||
$this->assertContains('"title":"Kimai 2 - API Docs"', $client->getResponse()->getContent());
|
||||
$this->assertStringContainsString('"title":"Kimai 2 - API Docs"', $client->getResponse()->getContent());
|
||||
$result = json_decode($client->getResponse()->getContent(), true);
|
||||
$this->assertIsArray($result);
|
||||
$this->assertNotEmpty($result);
|
||||
|
||||
@@ -18,7 +18,7 @@ use Symfony\Component\HttpFoundation\Response;
|
||||
*/
|
||||
class TagControllerTest extends APIControllerBaseTest
|
||||
{
|
||||
public function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
$client = $this->getClientForAuthenticatedUser(User::ROLE_USER);
|
||||
$em = $client->getContainer()->get('doctrine.orm.entity_manager');
|
||||
|
||||
@@ -36,7 +36,7 @@ class TimesheetControllerTest extends APIControllerBaseTest
|
||||
*/
|
||||
protected $dateTime;
|
||||
|
||||
public function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
$this->importFixtureForUser(User::ROLE_USER);
|
||||
$this->dateTime = (new UserDateTimeFactoryFactory($this))->create(self::TEST_TIMEZONE);
|
||||
|
||||
Reference in New Issue
Block a user