GoogleSpreadsheet\Tests\Google\Spreadsheet\ListEntryTest::testUpdate PHP Method

testUpdate() public method

public testUpdate ( )
    public function testUpdate()
    {
        $mockServiceRequest = $this->getMockBuilder(DefaultServiceRequest::class)->setMethods(["put"])->disableOriginalConstructor()->getMock();
        $mockServiceRequest->expects($this->once())->method("put")->with($this->equalTo("https://spreadsheets.google.com/feeds/list/G3345eEsfsk60/od6/private/full/cokwr/bnkj8i7jo6c"), $this->stringContains("<gsx:nname>Asim</gsx:nname>"));
        ServiceRequestFactory::setInstance($mockServiceRequest);
        $listFeed = new ListFeed($this->getSimpleXMLElement("list-feed"));
        $entry = current($listFeed->getEntries());
        $data = $entry->getValues();
        $data["nname"] = "Asim";
        $entry->update($data);
    }