diff options
author | Nicolas Lœuillet <nicolas@loeuillet.org> | 2016-01-02 12:46:52 +0100 |
---|---|---|
committer | Nicolas Lœuillet <nicolas@loeuillet.org> | 2016-01-02 12:46:52 +0100 |
commit | dad1c546a521159ca65a5a7649651d37728f0e55 (patch) | |
tree | f1d59eb83b45adb83bb21726374133a399d3c740 /src/Wallabag/ApiBundle/Tests/WallabagApiTestCase.php | |
parent | 5432f6150939af6e7d2e8bf0faea0576491aaed0 (diff) | |
parent | 6be9750155fa731d75898b4973a126a090345c2d (diff) | |
download | wallabag-dad1c546a521159ca65a5a7649651d37728f0e55.tar.gz wallabag-dad1c546a521159ca65a5a7649651d37728f0e55.tar.zst wallabag-dad1c546a521159ca65a5a7649651d37728f0e55.zip |
Merge pull request #1545 from wallabag/v2-user-tag
v2 – Remove user reference in tag
Diffstat (limited to 'src/Wallabag/ApiBundle/Tests/WallabagApiTestCase.php')
-rw-r--r-- | src/Wallabag/ApiBundle/Tests/WallabagApiTestCase.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/Wallabag/ApiBundle/Tests/WallabagApiTestCase.php b/src/Wallabag/ApiBundle/Tests/WallabagApiTestCase.php index 8a57fea2..a415c749 100644 --- a/src/Wallabag/ApiBundle/Tests/WallabagApiTestCase.php +++ b/src/Wallabag/ApiBundle/Tests/WallabagApiTestCase.php | |||
@@ -12,6 +12,11 @@ abstract class WallabagApiTestCase extends WebTestCase | |||
12 | */ | 12 | */ |
13 | protected $client = null; | 13 | protected $client = null; |
14 | 14 | ||
15 | /** | ||
16 | * @var \FOS\UserBundle\Model\UserInterface | ||
17 | */ | ||
18 | protected $user; | ||
19 | |||
15 | public function setUp() | 20 | public function setUp() |
16 | { | 21 | { |
17 | $this->client = $this->createAuthorizedClient(); | 22 | $this->client = $this->createAuthorizedClient(); |
@@ -31,8 +36,8 @@ abstract class WallabagApiTestCase extends WebTestCase | |||
31 | $loginManager = $container->get('fos_user.security.login_manager'); | 36 | $loginManager = $container->get('fos_user.security.login_manager'); |
32 | $firewallName = $container->getParameter('fos_user.firewall_name'); | 37 | $firewallName = $container->getParameter('fos_user.firewall_name'); |
33 | 38 | ||
34 | $user = $userManager->findUserBy(array('username' => 'admin')); | 39 | $this->user = $userManager->findUserBy(array('username' => 'admin')); |
35 | $loginManager->loginUser($firewallName, $user); | 40 | $loginManager->loginUser($firewallName, $this->user); |
36 | 41 | ||
37 | // save the login token into the session and put it in a cookie | 42 | // save the login token into the session and put it in a cookie |
38 | $container->get('session')->set('_security_'.$firewallName, serialize($container->get('security.token_storage')->getToken())); | 43 | $container->get('session')->set('_security_'.$firewallName, serialize($container->get('security.token_storage')->getToken())); |