GoogleSpreadsheet\Tests\Google\Spreadsheet\WorksheetTest::testGetCellFeedWithQuery PHP Метод

testGetCellFeedWithQuery() публичный Метод

    public function testGetCellFeedWithQuery()
    {
        $feedUrl = "https://spreadsheets.google.com/feeds/cells/tA3TdJ0RIVEem3xQZhG2Ceg/od8/private/full?sq=age+%3E+45";
        $mockServiceRequest = $this->getMockBuilder(DefaultServiceRequest::class)->setMethods(["get"])->disableOriginalConstructor()->getMock();
        $mockServiceRequest->expects($this->once())->method("get")->with($this->equalTo($feedUrl))->willReturn(file_get_contents(__DIR__ . "/xml/cell-feed.xml"));
        ServiceRequestFactory::setInstance($mockServiceRequest);
        $this->assertTrue($this->worksheet->getCellFeed(["sq" => "age > 45"]) instanceof CellFeed);
    }