diff --git a/tests/Eccube/Tests/Web/AbstractWebTestCase.php b/tests/Eccube/Tests/Web/AbstractWebTestCase.php index 03c28c419f5..92fb6fed2fd 100644 --- a/tests/Eccube/Tests/Web/AbstractWebTestCase.php +++ b/tests/Eccube/Tests/Web/AbstractWebTestCase.php @@ -13,6 +13,7 @@ namespace Eccube\Tests\Web; +use Eccube\Entity\Customer; use Eccube\Tests\EccubeTestCase; use Symfony\Component\BrowserKit\Cookie; use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; @@ -59,7 +60,8 @@ public function logIn($user = null) */ public function loginTo(UserInterface $User) { - $this->client->loginUser($User); + $firewallContext = $User instanceof Customer ? 'customer' : 'admin'; + $this->client->loginUser($User, $firewallContext); return $this->client; }