Inheritance: extends BaseBasketFactory
 public function testLogout()
 {
     $basketManager = $this->getMock('Sonata\\Component\\Basket\\BasketManagerInterface');
     $basketBuilder = $this->getMock('Sonata\\Component\\Basket\\BasketBuilderInterface');
     $session = $this->getMock('Symfony\\Component\\HttpFoundation\\Session\\SessionInterface');
     $session->expects($this->once())->method('remove');
     $currencyDetector = $this->getMock('Sonata\\Component\\Currency\\CurrencyDetectorInterface');
     $factory = new BasketSessionFactory($basketManager, $basketBuilder, $currencyDetector, $session);
     $factory->logout(new Request(), new Response(), $this->getMock('Symfony\\Component\\Security\\Core\\Authentication\\Token\\TokenInterface'));
 }
 public function testSave()
 {
     $basketManager = $this->getMock('Sonata\\Component\\Basket\\BasketManagerInterface');
     $basketBuilder = $this->getMock('Sonata\\Component\\Basket\\BasketBuilderInterface');
     $session = $this->getMock('Symfony\\Component\\HttpFoundation\\Session\\SessionInterface');
     $customer = $this->getMock('Sonata\\Component\\Customer\\CustomerInterface');
     $customer->expects($this->any())->method('getId')->will($this->returnValue(1));
     $basket = $this->getMock('Sonata\\Component\\Basket\\BasketInterface');
     $basket->expects($this->once())->method('getCustomer')->will($this->returnValue($customer));
     $currencyDetector = $this->getMock('Sonata\\Component\\Currency\\CurrencyDetectorInterface');
     $currency = new Currency();
     $currency->setLabel("EUR");
     $currencyDetector->expects($this->any())->method('getCurrency')->will($this->returnValue($currency));
     $factory = new BasketSessionFactory($basketManager, $basketBuilder, $currencyDetector, $session);
     $factory->save($basket);
 }