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')); }