->
method('load'
) ->
with($request,
$context) ->
willReturn($page);
$this->controller->
loginPage($request,
$dataBag,
$context);
static::
assertSame($page,
$this->controller->renderStorefrontParameters
['page'
]);
static::
assertSame($dataBag,
$this->controller->renderStorefrontParameters
['data'
]);
static::
assertSame('frontend.account.home.page',
$this->controller->renderStorefrontParameters
['redirectTo'
] ?? ''
);
static::
assertSame('[]',
$this->controller->renderStorefrontParameters
['redirectParameters'
] ?? ''
);
static::
assertSame('frontend.account.login.page',
$this->controller->renderStorefrontParameters
['errorRoute'
] ?? ''
);
static::
assertInstanceOf(AccountLoginPageLoadedHook::
class,
$this->controller->calledHook
);
} public function testLoginNewContextIsAdded(): void
{ $this->loginRoute
->
method('login'
) ->
willReturn(new ContextTokenResponse('context_token_response'
));
$newSalesChannelContext = Generator::
createSalesChannelContext();
$this->salesChannelContextService
->
expects(static::
once())