Upgrade tests to PhpUnit 10 (#5252)
This commit is contained in:
@@ -11,7 +11,7 @@ namespace App\Tests\Controller\Reporting;
|
||||
|
||||
use App\Entity\Project;
|
||||
use App\Entity\User;
|
||||
use App\Tests\Controller\ControllerBaseTest;
|
||||
use App\Tests\Controller\AbstractControllerBaseTestCase;
|
||||
use App\Tests\DataFixtures\ActivityFixtures;
|
||||
use App\Tests\DataFixtures\CustomerFixtures;
|
||||
use App\Tests\DataFixtures\ProjectFixtures;
|
||||
@@ -22,7 +22,7 @@ use Symfony\Component\HttpKernel\HttpKernelBrowser;
|
||||
/**
|
||||
* @group integration
|
||||
*/
|
||||
class CustomerMonthlyProjectsControllerTest extends ControllerBaseTest
|
||||
class CustomerMonthlyProjectsControllerTest extends AbstractControllerBaseTestCase
|
||||
{
|
||||
public function testReportIsSecure(): void
|
||||
{
|
||||
@@ -90,14 +90,14 @@ class CustomerMonthlyProjectsControllerTest extends ControllerBaseTest
|
||||
$this->assertAccessIsGranted($client, '/reporting/customer/monthly_projects/export');
|
||||
|
||||
$response = $client->getResponse();
|
||||
$this->assertTrue($response->isSuccessful());
|
||||
self::assertTrue($response->isSuccessful());
|
||||
self::assertInstanceOf(BinaryFileResponse::class, $response);
|
||||
|
||||
// temporary file!
|
||||
$file = $response->getFile();
|
||||
self::assertFileDoesNotExist($response->getFile());
|
||||
|
||||
$this->assertEquals('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', $response->headers->get('Content-Type'));
|
||||
$this->assertStringContainsString('attachment; filename=kimai-export-users-', $response->headers->get('Content-Disposition'));
|
||||
self::assertEquals('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', $response->headers->get('Content-Type'));
|
||||
self::assertStringContainsString('attachment; filename=kimai-export-users-', $response->headers->get('Content-Disposition'));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user