GoogleSpreadsheet\Tests\Google\Spreadsheet\WorksheetTest::testGetListFeedWithQuery PHP Method

testGetListFeedWithQuery() public method

    public function testGetListFeedWithQuery()
    {
        $feedUrl = "https://spreadsheets.google.com/feeds/list/tA3TdJ0RIVEem3xQZhG2Ceg/od8/private/full?reverse=true&sq=age+%3E+45";
        $mockServiceRequest = $this->getMockBuilder("Google\\Spreadsheet\\DefaultServiceRequest")->setMethods(["get"])->disableOriginalConstructor()->getMock();
        $mockServiceRequest->expects($this->once())->method("get")->with($this->equalTo($feedUrl))->willReturn(file_get_contents(__DIR__ . "/xml/list-feed.xml"));
        ServiceRequestFactory::setInstance($mockServiceRequest);
        $listFeed = $this->worksheet->getListFeed(["reverse" => "true", "sq" => "age > 45"]);
        $this->assertTrue($listFeed instanceof ListFeed);
    }