mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-05 22:35:01 +00:00
DX: apply rector rulesset up to PHP72
This commit is contained in:
@@ -198,10 +198,10 @@ final class ExportManagerTest extends KernelTestCase
|
||||
|
||||
//create a formatter
|
||||
$formatterFoo = $this->prophet->prophesize();
|
||||
$formatterFoo->willImplement('Chill\MainBundle\Export\FormatterInterface');
|
||||
$formatterFoo->willImplement(\Chill\MainBundle\Export\FormatterInterface::class);
|
||||
$formatterFoo->getType()->willReturn('foo');
|
||||
$formatterBar = $this->prophet->prophesize();
|
||||
$formatterBar->willImplement('Chill\MainBundle\Export\FormatterInterface');
|
||||
$formatterBar->willImplement(\Chill\MainBundle\Export\FormatterInterface::class);
|
||||
$formatterBar->getType()->willReturn('bar');
|
||||
$exportManager->addFormatter($formatterFoo->reveal(), 'foo');
|
||||
$exportManager->addFormatter($formatterBar->reveal(), 'bar');
|
||||
@@ -380,12 +380,12 @@ final class ExportManagerTest extends KernelTestCase
|
||||
|
||||
//create a filter and add it to ExportManager
|
||||
$agg = $this->prophet->prophesize();
|
||||
$agg->willImplement('Chill\MainBundle\Export\AggregatorInterface');
|
||||
$agg->willImplement(\Chill\MainBundle\Export\AggregatorInterface::class);
|
||||
$exportManager->addAggregator($agg->reveal(), 'dummy');
|
||||
|
||||
$obtained = $exportManager->getAggregator('dummy');
|
||||
|
||||
$this->assertInstanceof('Chill\MainBundle\Export\AggregatorInterface', $obtained);
|
||||
$this->assertInstanceof(\Chill\MainBundle\Export\AggregatorInterface::class, $obtained);
|
||||
}
|
||||
|
||||
public function testGetAggregatorNonExistant()
|
||||
@@ -403,11 +403,11 @@ final class ExportManagerTest extends KernelTestCase
|
||||
|
||||
//create three filters and add them to ExportManager
|
||||
$aggFoo = $this->prophet->prophesize();
|
||||
$aggFoo->willImplement('Chill\MainBundle\Export\AggregatorInterface');
|
||||
$aggFoo->willImplement(\Chill\MainBundle\Export\AggregatorInterface::class);
|
||||
$aggBar = $this->prophet->prophesize();
|
||||
$aggBar->willImplement('Chill\MainBundle\Export\AggregatorInterface');
|
||||
$aggBar->willImplement(\Chill\MainBundle\Export\AggregatorInterface::class);
|
||||
$aggFooBar = $this->prophet->prophesize();
|
||||
$aggFooBar->willImplement('Chill\MainBundle\Export\AggregatorInterface');
|
||||
$aggFooBar->willImplement(\Chill\MainBundle\Export\AggregatorInterface::class);
|
||||
$exportManager->addAggregator($aggFoo->reveal(), 'foo');
|
||||
$exportManager->addAggregator($aggBar->reveal(), 'bar');
|
||||
$exportManager->addAggregator($aggFooBar->reveal(), 'foobar');
|
||||
@@ -477,12 +477,12 @@ final class ExportManagerTest extends KernelTestCase
|
||||
|
||||
//create a filter and add it to ExportManager
|
||||
$filter = $this->prophet->prophesize();
|
||||
$filter->willImplement('Chill\MainBundle\Export\FilterInterface');
|
||||
$filter->willImplement(\Chill\MainBundle\Export\FilterInterface::class);
|
||||
$exportManager->addFilter($filter->reveal(), 'dummy');
|
||||
|
||||
$obtained = $exportManager->getFilter('dummy');
|
||||
|
||||
$this->assertInstanceof('Chill\MainBundle\Export\FilterInterface', $obtained);
|
||||
$this->assertInstanceof(\Chill\MainBundle\Export\FilterInterface::class, $obtained);
|
||||
}
|
||||
|
||||
public function testGetFilterNonExistant()
|
||||
@@ -500,11 +500,11 @@ final class ExportManagerTest extends KernelTestCase
|
||||
|
||||
//create three filters and add them to ExportManager
|
||||
$filterFoo = $this->prophet->prophesize();
|
||||
$filterFoo->willImplement('Chill\MainBundle\Export\FilterInterface');
|
||||
$filterFoo->willImplement(\Chill\MainBundle\Export\FilterInterface::class);
|
||||
$filterBar = $this->prophet->prophesize();
|
||||
$filterBar->willImplement('Chill\MainBundle\Export\FilterInterface');
|
||||
$filterBar->willImplement(\Chill\MainBundle\Export\FilterInterface::class);
|
||||
$filterFooBar = $this->prophet->prophesize();
|
||||
$filterFooBar->willImplement('Chill\MainBundle\Export\FilterInterface');
|
||||
$filterFooBar->willImplement(\Chill\MainBundle\Export\FilterInterface::class);
|
||||
$exportManager->addFilter($filterFoo->reveal(), 'foo');
|
||||
$exportManager->addFilter($filterBar->reveal(), 'bar');
|
||||
$exportManager->addFilter($filterFooBar->reveal(), 'foobar');
|
||||
@@ -522,12 +522,12 @@ final class ExportManagerTest extends KernelTestCase
|
||||
|
||||
//create a formatter
|
||||
$formatter = $this->prophet->prophesize();
|
||||
$formatter->willImplement('Chill\MainBundle\Export\FormatterInterface');
|
||||
$formatter->willImplement(\Chill\MainBundle\Export\FormatterInterface::class);
|
||||
$exportManager->addFormatter($formatter->reveal(), 'dummy');
|
||||
|
||||
$obtained = $exportManager->getFormatter('dummy');
|
||||
|
||||
$this->assertInstanceOf('Chill\MainBundle\Export\FormatterInterface', $obtained);
|
||||
$this->assertInstanceOf(\Chill\MainBundle\Export\FormatterInterface::class, $obtained);
|
||||
}
|
||||
|
||||
public function testIsGrantedForElementWithExportAndUserIsGranted()
|
||||
@@ -536,7 +536,7 @@ final class ExportManagerTest extends KernelTestCase
|
||||
$user = $this->prepareUser([]);
|
||||
|
||||
$authorizationChecker = $this->prophet->prophesize();
|
||||
$authorizationChecker->willImplement('Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface');
|
||||
$authorizationChecker->willImplement(\Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface::class);
|
||||
$authorizationChecker->isGranted('CHILL_STAT_DUMMY', $center)
|
||||
->willReturn(true);
|
||||
|
||||
@@ -564,7 +564,7 @@ final class ExportManagerTest extends KernelTestCase
|
||||
$user = $this->prepareUser([]);
|
||||
|
||||
$authorizationChecker = $this->prophet->prophesize();
|
||||
$authorizationChecker->willImplement('Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface');
|
||||
$authorizationChecker->willImplement(\Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface::class);
|
||||
$authorizationChecker->isGranted('CHILL_STAT_DUMMY', $center)
|
||||
->willReturn(true);
|
||||
$authorizationChecker->isGranted('CHILL_STAT_DUMMY', $centerB)
|
||||
|
Reference in New Issue
Block a user