mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
tests/ChillPersonBundle: in sf4 container is a static method of KernelTestCase
This commit is contained in:
parent
e4e2138765
commit
f02d6df262
@ -36,12 +36,6 @@ class PickPersonTypeTest extends KernelTestCase
|
||||
*/
|
||||
protected $user;
|
||||
|
||||
/**
|
||||
*
|
||||
* @var \Symfony\Component\DependencyInjection\ContainerInterface
|
||||
*/
|
||||
protected $container;
|
||||
|
||||
/**
|
||||
*
|
||||
* @var \Symfony\Component\Form\FormFactoryInterface
|
||||
@ -52,16 +46,14 @@ class PickPersonTypeTest extends KernelTestCase
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->container = self::$kernel->getContainer();
|
||||
|
||||
$this->user = $this->container->get('doctrine.orm.entity_manager')
|
||||
$this->user = self::$container->get('doctrine.orm.entity_manager')
|
||||
->getRepository('ChillMainBundle:User')
|
||||
->findOneBy(array('username' => 'multi_center'));
|
||||
|
||||
$this->formFactory = $this->container->get('form.factory');
|
||||
$this->formFactory = self::$container->get('form.factory');
|
||||
|
||||
$token = (new UsernamePasswordToken($this->user, 'password', 'firewall'));
|
||||
$this->container->get('security.token_storage')
|
||||
self::$container->get('security.token_storage')
|
||||
->setToken($token);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user