Sonata\Test\BasketBundle\Controller\Api\BasketControllerTest::testGetBasketAction PHP Method

testGetBasketAction() public method

public testGetBasketAction ( )
    public function testGetBasketAction()
    {
        $basket = $this->getMock('Sonata\\Component\\Basket\\BasketInterface');
        $basketManager = $this->getMock('Sonata\\Component\\Basket\\BasketManagerInterface');
        $basketManager->expects($this->once())->method('findOneBy')->will($this->returnValue($basket));
        $this->assertEquals($basket, $this->createBasketController($basketManager)->getBasketAction(1));
    }