public function testPutBasketAction()
{
$basket = $this->getMock('Sonata\\Component\\Basket\\BasketInterface');
$basketManager = $this->getMock('Sonata\\Component\\Basket\\BasketManagerInterface');
$basketManager->expects($this->once())->method('save')->will($this->returnValue($basket));
$basketManager->expects($this->once())->method('findOneBy')->will($this->returnValue($basket));
$form = $this->getMockBuilder('Symfony\\Component\\Form\\Form')->disableOriginalConstructor()->getMock();
$form->expects($this->once())->method('bind');
$form->expects($this->once())->method('isValid')->will($this->returnValue(true));
$form->expects($this->once())->method('getData')->will($this->returnValue($basket));
$formFactory = $this->getMock('Symfony\\Component\\Form\\FormFactoryInterface');
$formFactory->expects($this->once())->method('createNamed')->will($this->returnValue($form));
$view = $this->createBasketController($basketManager, null, null, null, $formFactory)->putBasketAction(1, new Request());
$this->assertInstanceOf('FOS\\RestBundle\\View\\View', $view);
}