spec\Sylius\Bundle\CoreBundle\Context\SessionAndChannelBasedCartContextSpec::it_throws_cart_not_found_exception_if_session_key_does_not_exist PHP Метод

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

public it_throws_cart_not_found_exception_if_session_key_does_not_exist ( Symfony\Component\HttpFoundation\Session\SessionInterface $session, Sylius\Component\Channel\Context\ChannelContextInterface $channelContext, Sylius\Component\Core\Model\ChannelInterface $channel )
$session Symfony\Component\HttpFoundation\Session\SessionInterface
$channelContext Sylius\Component\Channel\Context\ChannelContextInterface
$channel Sylius\Component\Core\Model\ChannelInterface
    function it_throws_cart_not_found_exception_if_session_key_does_not_exist(SessionInterface $session, ChannelContextInterface $channelContext, ChannelInterface $channel)
    {
        $channelContext->getChannel()->willReturn($channel);
        $channel->getCode()->willReturn('Poland');
        $session->has('session_key_name.Poland')->willReturn(false);
        $this->shouldThrow(CartNotFoundException::class)->during('getCart');
    }