Skip to content

Commit

Permalink
ログイン処理を修正
Browse files Browse the repository at this point in the history
  • Loading branch information
chihiro-adachi committed Dec 19, 2023
1 parent cef00fd commit 7438da0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/Eccube/Tests/Web/AbstractWebTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 7438da0

Please sign in to comment.