DX: apply rector rulesset up to PHP72

This commit is contained in:
2023-03-29 22:32:52 +02:00
parent 64b8ae3df1
commit b9a7530f7a
110 changed files with 194 additions and 229 deletions

View File

@@ -52,7 +52,7 @@ final class CustomFieldsGroupControllerTest extends WebTestCase
// Fill in the form and submit it
$form = $crawler->selectButton('Créer')->form([
'custom_fields_group[name][fr]' => 'Test',
'custom_fields_group[entity]' => 'Chill\PersonBundle\Entity\Person',
'custom_fields_group[entity]' => \Chill\PersonBundle\Entity\Person::class,
]);
$crawler = $client->submit($form);

View File

@@ -34,12 +34,12 @@ trait CustomFieldTestHelper
$kernel = static::$kernel;
//check a kernel is accessible
$customFieldsGroup = $this->createMock('Chill\CustomFieldsBundle\Entity\CustomFieldsGroup');
$customFieldsGroup = $this->createMock(\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup::class);
$customFieldsGroup->expects($this->once())
->method('getActiveCustomFields')
->will($this->returnValue([$field]));
$request = $this->createMock('Symfony\Component\HttpFoundation\Request');
$request = $this->createMock(\Symfony\Component\HttpFoundation\Request::class);
$request->expects($this->any())
->method('getLocale')
->will($this->returnValue($locale));

View File

@@ -41,11 +41,11 @@ final class CustomFieldsTextTest extends WebTestCase
$customField = $this->customFieldProvider->getCustomFieldByType('text');
$this->assertInstanceOf(
'Chill\CustomFieldsBundle\CustomFields\CustomFieldInterface',
\Chill\CustomFieldsBundle\CustomFields\CustomFieldInterface::class,
$customField
);
$this->assertInstanceOf(
'Chill\CustomFieldsBundle\CustomFields\CustomFieldText',
\Chill\CustomFieldsBundle\CustomFields\CustomFieldText::class,
$customField
);
}

View File

@@ -46,7 +46,7 @@ final class CustomFieldRenderingTwigTest extends KernelTestCase
// set locale to fr
$prophet = new \Prophecy\Prophet();
$request = $prophet->prophesize();
$request->willExtend('Symfony\Component\HttpFoundation\Request');
$request->willExtend(\Symfony\Component\HttpFoundation\Request::class);
$request->getLocale()->willReturn('fr');
self::$kernel->getContainer()->get('request_stack')
->push($request->reveal());

View File

@@ -48,7 +48,7 @@ final class CustomFieldsGroupRenderingTwigTest extends KernelTestCase
// set locale to fr
$prophet = new \Prophecy\Prophet();
$request = $prophet->prophesize();
$request->willExtend('Symfony\Component\HttpFoundation\Request');
$request->willExtend(\Symfony\Component\HttpFoundation\Request::class);
$request->getLocale()->willReturn('fr');
self::$kernel->getContainer()->get('request_stack')
->push($request->reveal());