remove references to ->getContainer in favor of static::

This commit is contained in:
2021-05-07 10:56:49 +02:00
parent 6df8e6dec8
commit c93d5ceb16
11 changed files with 19 additions and 37 deletions

View File

@@ -38,9 +38,7 @@ class AgeAggregatorTest extends AbstractAggregatorTest
{
static::bootKernel();
$container = static::$kernel->getContainer();
$this->aggregator = $container->get('chill.person.export.aggregator_age');
$this->aggregator = static::$container->get('chill.person.export.aggregator_age');
}
public function getAggregator()
@@ -63,7 +61,7 @@ class AgeAggregatorTest extends AbstractAggregatorTest
static::bootKernel();
}
$em = static::$kernel->getContainer()
$em = static::$container
->get('doctrine.orm.entity_manager');
return array(

View File

@@ -37,9 +37,7 @@ class GenderAggregatorTest extends AbstractAggregatorTest
{
static::bootKernel();
$container = static::$kernel->getContainer();
$this->aggregator = $container->get('chill.person.export.aggregator_gender');
$this->aggregator = static::$container->get('chill.person.export.aggregator_gender');
}
public function getAggregator()
@@ -60,7 +58,7 @@ class GenderAggregatorTest extends AbstractAggregatorTest
static::bootKernel();
}
$em = static::$kernel->getContainer()
$em = static::$container
->get('doctrine.orm.entity_manager');
return array(

View File

@@ -17,7 +17,6 @@
*/
namespace Chill\PersonBundle\Tests\Export\Aggregator;
require_once '/home/julien/dev/chill-dev/vendor/chill-project/main/Test/Export/AbstractAggregatorTest.php';
use Chill\MainBundle\Test\Export\AbstractAggregatorTest;
/**
@@ -25,7 +24,7 @@ use Chill\MainBundle\Test\Export\AbstractAggregatorTest;
*
* @author Julien Fastré <julien.fastre@champs-libres.coop>
*/
class NationalityAggregator extends AbstractAggregatorTest
class NationalityAggregatorTest extends AbstractAggregatorTest
{
/**
*
@@ -37,9 +36,7 @@ class NationalityAggregator extends AbstractAggregatorTest
{
static::bootKernel();
$container = static::$kernel->getContainer();
$this->aggregator = $container->get('chill.person.export.aggregator_nationality');
$this->aggregator = static::$container->get('chill.person.export.aggregator_nationality');
}
public function getAggregator()
@@ -61,7 +58,7 @@ class NationalityAggregator extends AbstractAggregatorTest
static::bootKernel();
}
$em = static::$kernel->getContainer()
$em = static::$container
->get('doctrine.orm.entity_manager');
return array(