Skip to content

Commit e273582

Browse files
committed
Fixed tests for new PHPunit 11.5
1 parent f3ad3c1 commit e273582

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+92
-95
lines changed

phpunit.xml.dist

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,7 @@
1919
<ini name="memory_limit" value="1G"/>
2020
<ini name="display_errors" value="1"/>
2121
</php>
22-
<coverage processUncoveredFiles="true">
23-
<include>
24-
<directory suffix=".php">src</directory>
25-
</include>
22+
<coverage includeUncoveredFiles="true">
2623
</coverage>
2724

2825
<testsuites>

rector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
PHPUnitSetList::PHPUNIT_110,
3838
PHPUnitSetList::PHPUNIT_CODE_QUALITY,
3939

40-
40+
4141
])
4242

4343
->withRules([

tests/ApplicationAvailabilityFunctionalTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function testPageIsSuccessful(string $url): void
5353
$this->assertTrue($client->getResponse()->isSuccessful(), 'Request not successful. Status code is '.$client->getResponse()->getStatusCode() . ' for URL '.$url);
5454
}
5555

56-
public function urlProvider(): ?Generator
56+
public static function urlProvider(): ?Generator
5757
{
5858
//Homepage
5959
yield ['/'];

tests/Controller/AdminPages/AbstractAdminControllerTest.php renamed to tests/Controller/AdminPages/AbstractAdminController.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@
2929

3030
#[Group('slow')]
3131
#[Group('DB')]
32-
abstract class AbstractAdminControllerTest extends WebTestCase
32+
abstract class AbstractAdminController extends WebTestCase
3333
{
3434
protected static string $base_path = 'not_valid';
3535
protected static string $entity_class = 'not valid';
3636

37-
public function readDataProvider(): \Iterator
37+
public static function readDataProvider(): \Iterator
3838
{
3939
yield ['noread', false];
4040
yield ['anonymous', true];
@@ -99,7 +99,7 @@ public function testReadEntity(string $user, bool $read): void
9999
$this->assertSame($read, !$client->getResponse()->isForbidden(), 'Permission Checking not working!');
100100
}
101101

102-
public function deleteDataProvider(): \Iterator
102+
public static function deleteDataProvider(): \Iterator
103103
{
104104
yield ['noread', false];
105105
yield ['anonymous', false];

tests/Controller/AdminPages/AttachmentTypeControllerTest.php renamed to tests/Controller/AdminPages/AttachmentTypeController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
#[Group('slow')]
2929
#[Group('DB')]
30-
class AttachmentTypeControllerTest extends AbstractAdminControllerTest
30+
class AttachmentTypeController extends AbstractAdminController
3131
{
3232
protected static string $base_path = '/en/attachment_type';
3333
protected static string $entity_class = AttachmentType::class;

tests/Controller/AdminPages/CategoryControllerTest.php renamed to tests/Controller/AdminPages/CategoryController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
#[Group('slow')]
2929
#[Group('DB')]
30-
class CategoryControllerTest extends AbstractAdminControllerTest
30+
class CategoryController extends AbstractAdminController
3131
{
3232
protected static string $base_path = '/en/category';
3333
protected static string $entity_class = Category::class;

tests/Controller/AdminPages/FootprintControllerTest.php renamed to tests/Controller/AdminPages/FootprintController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
#[Group('slow')]
2929
#[Group('DB')]
30-
class FootprintControllerTest extends AbstractAdminControllerTest
30+
class FootprintController extends AbstractAdminController
3131
{
3232
protected static string $base_path = '/en/footprint';
3333
protected static string $entity_class = Footprint::class;

tests/Controller/AdminPages/LabelProfileControllerTest.php renamed to tests/Controller/AdminPages/LabelProfileController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
use App\Entity\LabelSystem\LabelProfile;
4747
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
4848

49-
class LabelProfileControllerTest extends AbstractAdminControllerTest
49+
class LabelProfileController extends AbstractAdminController
5050
{
5151
protected static string $base_path = '/en/label_profile';
5252
protected static string $entity_class = LabelProfile::class;

tests/Controller/AdminPages/ManufacturerControllerTest.php renamed to tests/Controller/AdminPages/ManufacturerController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
#[Group('slow')]
2929
#[Group('DB')]
30-
class ManufacturerControllerTest extends AbstractAdminControllerTest
30+
class ManufacturerController extends AbstractAdminController
3131
{
3232
protected static string $base_path = '/en/manufacturer';
3333
protected static string $entity_class = Manufacturer::class;

tests/Controller/AdminPages/MeasurementUnitControllerTest.php renamed to tests/Controller/AdminPages/MeasurementUnitController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
#[Group('slow')]
2929
#[Group('DB')]
30-
class MeasurementUnitControllerTest extends AbstractAdminControllerTest
30+
class MeasurementUnitController extends AbstractAdminController
3131
{
3232
protected static string $base_path = '/en/measurement_unit';
3333
protected static string $entity_class = MeasurementUnit::class;

0 commit comments

Comments
 (0)