mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-08 07:44:59 +00:00
DX: apply rector rulesset up to PHP72
This commit is contained in:
@@ -64,7 +64,7 @@ final class ReportControllerNextTest extends WebTestCase
|
||||
$customFieldsGroups = self::$kernel->getContainer()
|
||||
->get('doctrine.orm.entity_manager')
|
||||
->getRepository(\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup::class)
|
||||
->findBy(['entity' => 'Chill\ReportBundle\Entity\Report']);
|
||||
->findBy(['entity' => \Chill\ReportBundle\Entity\Report::class]);
|
||||
//filter customFieldsGroup to get only "situation de logement"
|
||||
$filteredCustomFieldsGroupHouse = array_filter(
|
||||
$customFieldsGroups,
|
||||
|
@@ -82,7 +82,7 @@ final class ReportControllerTest extends WebTestCase
|
||||
$customFieldsGroups = self::$kernel->getContainer()
|
||||
->get('doctrine.orm.entity_manager')
|
||||
->getRepository(\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup::class)
|
||||
->findBy(['entity' => 'Chill\ReportBundle\Entity\Report']);
|
||||
->findBy(['entity' => \Chill\ReportBundle\Entity\Report::class]);
|
||||
//filter customFieldsGroup to get only "situation de logement"
|
||||
$filteredCustomFieldsGroupHouse = array_filter(
|
||||
$customFieldsGroups,
|
||||
@@ -132,7 +132,7 @@ final class ReportControllerTest extends WebTestCase
|
||||
$form = $crawlerAddAReportPage->selectButton('Créer un nouveau rapport')->form();
|
||||
|
||||
$this->assertInstanceOf(
|
||||
'Symfony\Component\DomCrawler\Form',
|
||||
\Symfony\Component\DomCrawler\Form::class,
|
||||
$form,
|
||||
'I can see a form with a button "add a new report" '
|
||||
);
|
||||
@@ -251,7 +251,7 @@ final class ReportControllerTest extends WebTestCase
|
||||
|
||||
$link = $crawlerPersonPage->selectLink("AJOUT D'UN RAPPORT")->link();
|
||||
$this->assertInstanceOf(
|
||||
'Symfony\Component\DomCrawler\Link',
|
||||
\Symfony\Component\DomCrawler\Link::class,
|
||||
$link,
|
||||
'There is a "add a report" link in menu'
|
||||
);
|
||||
@@ -278,7 +278,7 @@ final class ReportControllerTest extends WebTestCase
|
||||
->form();
|
||||
|
||||
$this->assertInstanceOf(
|
||||
'Symfony\Component\DomCrawler\Form',
|
||||
\Symfony\Component\DomCrawler\Form::class,
|
||||
$addForm,
|
||||
'I have a report form'
|
||||
);
|
||||
|
@@ -32,7 +32,7 @@ final class ChillReportExtensionTest extends KernelTestCase
|
||||
$reportFounded = false;
|
||||
|
||||
foreach ($customizablesEntities as $customizablesEntity) {
|
||||
if ('Chill\ReportBundle\Entity\Report' === $customizablesEntity['class']) {
|
||||
if (\Chill\ReportBundle\Entity\Report::class === $customizablesEntity['class']) {
|
||||
$reportFounded = true;
|
||||
}
|
||||
}
|
||||
|
@@ -167,7 +167,7 @@ final class ReportVoterTest extends KernelTestCase
|
||||
{
|
||||
$token = $this->prophet->prophesize();
|
||||
$token
|
||||
->willImplement('\Symfony\Component\Security\Core\Authentication\Token\TokenInterface');
|
||||
->willImplement('\\' . \Symfony\Component\Security\Core\Authentication\Token\TokenInterface::class);
|
||||
|
||||
if (null === $user) {
|
||||
$token->getUser()->willReturn(null);
|
||||
|
@@ -191,6 +191,6 @@ final class TimelineProviderTest extends WebTestCase
|
||||
}
|
||||
}
|
||||
|
||||
return $groups[mt_rand(0, count($groups) - 1)];
|
||||
return $groups[random_int(0, count($groups) - 1)];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user