mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-30 03:23:48 +00:00
DX: apply rector rulesset up to PHP72
This commit is contained in:
@@ -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);
|
||||
|
@@ -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));
|
||||
|
@@ -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
|
||||
);
|
||||
}
|
||||
|
@@ -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());
|
||||
|
@@ -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());
|
||||
|
Reference in New Issue
Block a user