PHP Class spec\Sylius\Bundle\CoreBundle\Context\SessionAndChannelBasedCartContextSpec

Author: Anna Walasek ([email protected])
Inheritance: extends PhpSpec\ObjectBehavior
Mostrar archivo Open project: sylius/sylius

Public Methods

Method Description
it_implements_cart_context_interface ( )
it_is_initializable ( )
it_returns_cart_based_on_id_stored_in_session_and_current_channel ( Symfony\Component\HttpFoundation\Session\SessionInterface $session, Sylius\Component\Core\Repository\OrderRepositoryInterface $orderRepository, Sylius\Component\Channel\Context\ChannelContextInterface $channelContext, Sylius\Component\Core\Model\ChannelInterface $channel, Sylius\Component\Order\Model\OrderInterface $cart )
it_throws_cart_not_found_exception_and_removes_id_from_session_when_cart_was_not_found ( Symfony\Component\HttpFoundation\Session\SessionInterface $session, Sylius\Component\Core\Repository\OrderRepositoryInterface $orderRepository, Sylius\Component\Channel\Context\ChannelContextInterface $channelContext, Sylius\Component\Core\Model\ChannelInterface $channel )
it_throws_cart_not_found_exception_if_channel_was_not_found ( Sylius\Component\Channel\Context\ChannelContextInterface $channelContext )
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 )
let ( Symfony\Component\HttpFoundation\Session\SessionInterface $session, Sylius\Component\Core\Repository\OrderRepositoryInterface $orderRepository, Sylius\Component\Channel\Context\ChannelContextInterface $channelContext )

Method Details

it_implements_cart_context_interface() public method

it_is_initializable() public method

public it_is_initializable ( )

it_returns_cart_based_on_id_stored_in_session_and_current_channel() public method

public it_returns_cart_based_on_id_stored_in_session_and_current_channel ( Symfony\Component\HttpFoundation\Session\SessionInterface $session, Sylius\Component\Core\Repository\OrderRepositoryInterface $orderRepository, Sylius\Component\Channel\Context\ChannelContextInterface $channelContext, Sylius\Component\Core\Model\ChannelInterface $channel, Sylius\Component\Order\Model\OrderInterface $cart )
$session Symfony\Component\HttpFoundation\Session\SessionInterface
$orderRepository Sylius\Component\Core\Repository\OrderRepositoryInterface
$channelContext Sylius\Component\Channel\Context\ChannelContextInterface
$channel Sylius\Component\Core\Model\ChannelInterface
$cart Sylius\Component\Order\Model\OrderInterface

it_throws_cart_not_found_exception_and_removes_id_from_session_when_cart_was_not_found() public method

public it_throws_cart_not_found_exception_and_removes_id_from_session_when_cart_was_not_found ( Symfony\Component\HttpFoundation\Session\SessionInterface $session, Sylius\Component\Core\Repository\OrderRepositoryInterface $orderRepository, Sylius\Component\Channel\Context\ChannelContextInterface $channelContext, Sylius\Component\Core\Model\ChannelInterface $channel )
$session Symfony\Component\HttpFoundation\Session\SessionInterface
$orderRepository Sylius\Component\Core\Repository\OrderRepositoryInterface
$channelContext Sylius\Component\Channel\Context\ChannelContextInterface
$channel Sylius\Component\Core\Model\ChannelInterface

it_throws_cart_not_found_exception_if_channel_was_not_found() public method

public it_throws_cart_not_found_exception_if_channel_was_not_found ( Sylius\Component\Channel\Context\ChannelContextInterface $channelContext )
$channelContext Sylius\Component\Channel\Context\ChannelContextInterface

it_throws_cart_not_found_exception_if_session_key_does_not_exist() public method

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

let() public method

public let ( Symfony\Component\HttpFoundation\Session\SessionInterface $session, Sylius\Component\Core\Repository\OrderRepositoryInterface $orderRepository, Sylius\Component\Channel\Context\ChannelContextInterface $channelContext )
$session Symfony\Component\HttpFoundation\Session\SessionInterface
$orderRepository Sylius\Component\Core\Repository\OrderRepositoryInterface
$channelContext Sylius\Component\Channel\Context\ChannelContextInterface