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

testGetListFeed() public method

public testGetListFeed ( )
    public function testGetListFeed()
    {
        $feedUrl = "https://spreadsheets.google.com/feeds/list/tA3TdJ0RIVEem3xQZhG2Ceg/od8/private/full";
        $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/list-feed.xml"));
        ServiceRequestFactory::setInstance($mockServiceRequest);
        $worksheet = new Worksheet($this->getSimpleXMLElement("worksheet"));
        $this->assertTrue($worksheet->getListFeed() instanceof ListFeed);
    }