X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2FWallabag%2FCoreBundle%2FWallabagCoreTestCase.php;h=1eda519946883052dc967584d180fd2c4edb4dd7;hb=f808b01692a835673f328d7221ba8c212caa9b61;hp=eec6939d77756c33f72f67d90f9db7f55af23ef3;hpb=822c877949aff8ae57677671115f8f4fc69588d5;p=github%2Fwallabag%2Fwallabag.git diff --git a/tests/Wallabag/CoreBundle/WallabagCoreTestCase.php b/tests/Wallabag/CoreBundle/WallabagCoreTestCase.php index eec6939d..1eda5199 100644 --- a/tests/Wallabag/CoreBundle/WallabagCoreTestCase.php +++ b/tests/Wallabag/CoreBundle/WallabagCoreTestCase.php @@ -18,11 +18,6 @@ abstract class WallabagCoreTestCase extends WebTestCase */ private $client = null; - public function getClient() - { - return $this->client; - } - public function setUp() { parent::setUp(); @@ -30,6 +25,11 @@ abstract class WallabagCoreTestCase extends WebTestCase $this->client = static::createClient(); } + public function getClient() + { + return $this->client; + } + public function resetDatabase(Client $client) { $application = new Application($client->getKernel()); @@ -83,10 +83,10 @@ abstract class WallabagCoreTestCase extends WebTestCase $loginManager = $container->get('fos_user.security.login_manager'); $firewallName = $container->getParameter('fos_user.firewall_name'); - $user = $userManager->findUserBy(array('username' => $username)); + $user = $userManager->findUserBy(['username' => $username]); $loginManager->logInUser($firewallName, $user); - $session->set('_security_'.$firewallName, serialize($container->get('security.token_storage')->getToken())); + $session->set('_security_' . $firewallName, serialize($container->get('security.token_storage')->getToken())); $session->save(); $cookie = new Cookie($session->getName(), $session->getId());