spec\Sylius\Bundle\CoreBundle\EventListener\ShopUserLogoutHandlerSpec::it_clears_cart_session_after_logging_out_and_return_default_handler_response PHP Метод

it_clears_cart_session_after_logging_out_and_return_default_handler_response() публичный Метод

public it_clears_cart_session_after_logging_out_and_return_default_handler_response ( Sylius\Component\Channel\Context\ChannelContextInterface $channelContext, Sylius\Component\Core\Model\ChannelInterface $channel, HttpUtils $httpUtils, Request $request, Response $response, Symfony\Component\HttpFoundation\Session\SessionInterface $session )
$channelContext Sylius\Component\Channel\Context\ChannelContextInterface
$channel Sylius\Component\Core\Model\ChannelInterface
$httpUtils Symfony\Component\Security\Http\HttpUtils
$request Symfony\Component\HttpFoundation\Request
$response Symfony\Component\HttpFoundation\Response
$session Symfony\Component\HttpFoundation\Session\SessionInterface
    function it_clears_cart_session_after_logging_out_and_return_default_handler_response(ChannelContextInterface $channelContext, ChannelInterface $channel, HttpUtils $httpUtils, Request $request, Response $response, SessionInterface $session)
    {
        $channelContext->getChannel()->willReturn($channel);
        $channel->getCode()->willReturn('WEB_US');
        $session->remove('_sylius.cart.WEB_US')->shouldBeCalled();
        $httpUtils->createRedirectResponse($request, '/')->willReturn($response);
        $this->onLogoutSuccess($request)->shouldReturn($response);
    }