public function editCell($rowNum, $colNum, $value)
{
$entry = new \SimpleXMLElement("\n <entry\n xmlns=\"http://www.w3.org/2005/Atom\"\n xmlns:gs=\"http://schemas.google.com/spreadsheets/2006\">\n </entry>\n ");
$child = $entry->addChild("xmlns:gs:cell");
$child->addAttribute("row", $rowNum);
$child->addAttribute("col", $colNum);
$child->addAttribute("inputValue", $value);
ServiceRequestFactory::getInstance()->post($this->getPostUrl(), $entry->asXML());
}
public function testEditCell() { $feed = new CellFeed($this->getSimpleXMLElement("cell-feed")); $mockServiceRequest = $this->getMockBuilder(DefaultServiceRequest::class)->setMethods(array("post"))->disableOriginalConstructor()->getMock(); $mockServiceRequest->expects($this->once())->method("post")->with($this->equalTo("https://spreadsheets.google.com/feeds/cells/15L06yklgflGRDjnN-VvhGYOoVLCH40DJoW5fFiqSTc5U/od6/private/full"), $this->stringContains("<entry")); ServiceRequestFactory::setInstance($mockServiceRequest); $feed->editCell(2, 1, "Test"); }