Upgrade tests to PhpUnit 10 (#5252)

This commit is contained in:
Kevin Papst
2024-12-22 01:25:30 +01:00
committed by GitHub
parent 9bd37fb695
commit c7f0508707
377 changed files with 3308 additions and 3409 deletions

View File

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