Sonata\Tests\Component\Basket\BasketSessionFactoryTest::testLogout PHP Method

testLogout() public method

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