Sonata\Test\InvoiceBundle\Controller\Api\InvoiceControllerTest::testGetInvoicesAction PHP Method

testGetInvoicesAction() public method

    public function testGetInvoicesAction()
    {
        $invoiceManager = $this->getMock('Sonata\\Component\\Invoice\\InvoiceManagerInterface');
        $invoiceManager->expects($this->once())->method('getPager')->will($this->returnValue(array()));
        $paramFetcher = $this->getMock('FOS\\RestBundle\\Request\\ParamFetcherInterface');
        $paramFetcher->expects($this->exactly(3))->method('get');
        $paramFetcher->expects($this->once())->method('all')->will($this->returnValue(array()));
        $this->assertEquals(array(), $this->createInvoiceController(null, $invoiceManager)->getInvoicesAction($paramFetcher));
    }