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

@@ -14,7 +14,7 @@ use App\Entity\User;
/**
* @group integration
*/
class ReportingControllerTest extends ControllerBaseTest
class ReportingControllerTest extends AbstractControllerBaseTestCase
{
public function testIsSecure(): void
{
@@ -26,7 +26,7 @@ class ReportingControllerTest extends ControllerBaseTest
$client = $this->getClientForAuthenticatedUser(User::ROLE_ADMIN);
$this->request($client, '/reporting/');
$nodes = $client->getCrawler()->filter('section.content div.row-cards a.card-link');
$this->assertCount(11, $nodes);
self::assertCount(11, $nodes);
}
public function testAllReports(): void
@@ -34,7 +34,7 @@ class ReportingControllerTest extends ControllerBaseTest
$client = $this->getClientForAuthenticatedUser(User::ROLE_SUPER_ADMIN);
$this->request($client, '/reporting/');
$nodes = $client->getCrawler()->filter('section.content div.row-cards a.card-link');
$this->assertCount(11, $nodes);
self::assertCount(11, $nodes);
foreach ($nodes as $node) {
self::assertNotNull($node->attributes);
$link = $node->attributes->getNamedItem('href');
@@ -52,6 +52,6 @@ class ReportingControllerTest extends ControllerBaseTest
$client = $this->getClientForAuthenticatedUser(User::ROLE_USER);
$this->request($client, '/reporting/');
$nodes = $client->getCrawler()->filter('section.content div.row-cards a.card-link');
$this->assertCount(3, $nodes);
self::assertCount(3, $nodes);
}
}