Fixed tests for new PHPunit 11.5
Some checks failed
Build assets artifact / Build assets artifact (push) Has been cancelled
Docker Image Build / docker (push) Has been cancelled
Docker Image Build (FrankenPHP) / docker (push) Has been cancelled
Static analysis / Static analysis (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.1, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.1, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.1, sqlite) (push) Has been cancelled

This commit is contained in:
Jan Böhmer 2025-07-14 21:57:27 +02:00
parent f3ad3c1ffe
commit e2735823a0
44 changed files with 91 additions and 94 deletions

View file

@ -29,12 +29,12 @@ use Symfony\Component\Security\Core\Exception\AccessDeniedException;
#[Group('slow')]
#[Group('DB')]
abstract class AbstractAdminControllerTest extends WebTestCase
abstract class AbstractAdminController extends WebTestCase
{
protected static string $base_path = 'not_valid';
protected static string $entity_class = 'not valid';
public function readDataProvider(): \Iterator
public static function readDataProvider(): \Iterator
{
yield ['noread', false];
yield ['anonymous', true];
@ -99,7 +99,7 @@ abstract class AbstractAdminControllerTest extends WebTestCase
$this->assertSame($read, !$client->getResponse()->isForbidden(), 'Permission Checking not working!');
}
public function deleteDataProvider(): \Iterator
public static function deleteDataProvider(): \Iterator
{
yield ['noread', false];
yield ['anonymous', false];

View file

@ -27,7 +27,7 @@ use App\Entity\Attachments\AttachmentType;
#[Group('slow')]
#[Group('DB')]
class AttachmentTypeControllerTest extends AbstractAdminControllerTest
class AttachmentTypeController extends AbstractAdminController
{
protected static string $base_path = '/en/attachment_type';
protected static string $entity_class = AttachmentType::class;

View file

@ -27,7 +27,7 @@ use App\Entity\Parts\Category;
#[Group('slow')]
#[Group('DB')]
class CategoryControllerTest extends AbstractAdminControllerTest
class CategoryController extends AbstractAdminController
{
protected static string $base_path = '/en/category';
protected static string $entity_class = Category::class;

View file

@ -27,7 +27,7 @@ use App\Entity\Parts\Footprint;
#[Group('slow')]
#[Group('DB')]
class FootprintControllerTest extends AbstractAdminControllerTest
class FootprintController extends AbstractAdminController
{
protected static string $base_path = '/en/footprint';
protected static string $entity_class = Footprint::class;

View file

@ -46,7 +46,7 @@ use PHPUnit\Framework\Attributes\Group;
use App\Entity\LabelSystem\LabelProfile;
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
class LabelProfileControllerTest extends AbstractAdminControllerTest
class LabelProfileController extends AbstractAdminController
{
protected static string $base_path = '/en/label_profile';
protected static string $entity_class = LabelProfile::class;

View file

@ -27,7 +27,7 @@ use App\Entity\Parts\Manufacturer;
#[Group('slow')]
#[Group('DB')]
class ManufacturerControllerTest extends AbstractAdminControllerTest
class ManufacturerController extends AbstractAdminController
{
protected static string $base_path = '/en/manufacturer';
protected static string $entity_class = Manufacturer::class;

View file

@ -27,7 +27,7 @@ use App\Entity\Parts\MeasurementUnit;
#[Group('slow')]
#[Group('DB')]
class MeasurementUnitControllerTest extends AbstractAdminControllerTest
class MeasurementUnitController extends AbstractAdminController
{
protected static string $base_path = '/en/measurement_unit';
protected static string $entity_class = MeasurementUnit::class;

View file

@ -28,7 +28,7 @@ use App\Entity\ProjectSystem\Project;
#[Group('slow')]
#[Group('DB')]
class ProjectControllerTest extends AbstractAdminControllerTest
class ProjectController extends AbstractAdminController
{
protected static string $base_path = '/en/project';
protected static string $entity_class = Project::class;

View file

@ -27,7 +27,7 @@ use App\Entity\Parts\StorageLocation;
#[Group('slow')]
#[Group('DB')]
class StorelocationControllerTest extends AbstractAdminControllerTest
class StorelocationController extends AbstractAdminController
{
protected static string $base_path = '/en/store_location';
protected static string $entity_class = StorageLocation::class;

View file

@ -27,7 +27,7 @@ use App\Entity\Parts\Supplier;
#[Group('slow')]
#[Group('DB')]
class SupplierControllerTest extends AbstractAdminControllerTest
class SupplierController extends AbstractAdminController
{
protected static string $base_path = '/en/supplier';
protected static string $entity_class = Supplier::class;