cellEntry = new Zend_Gdata_Spreadsheets_CellEntry(); } public function testToAndFromString() { $this->cellEntry->setCell(new Zend_Gdata_Spreadsheets_Extension_Cell('my cell', '1', '2', 'input value', 'numeric value')); $this->assertTrue($this->cellEntry->getCell()->getText() == 'my cell'); $this->assertTrue($this->cellEntry->getCell()->getRow() == '1'); $this->assertTrue($this->cellEntry->getCell()->getColumn() == '2'); $this->assertTrue($this->cellEntry->getCell()->getInputValue() == 'input value'); $this->assertTrue($this->cellEntry->getCell()->getNumericValue() == 'numeric value'); $newCellEntry = new Zend_Gdata_Spreadsheets_CellEntry(); $doc = new DOMDocument(); $doc->loadXML($this->cellEntry->saveXML()); $newCellEntry->transferFromDom($doc->documentElement); $this->assertTrue($this->cellEntry->getCell()->getText() == $newCellEntry->getCell()->getText()); $this->assertTrue($this->cellEntry->getCell()->getRow() == $newCellEntry->getCell()->getRow()); $this->assertTrue($this->cellEntry->getCell()->getColumn() == $newCellEntry->getCell()->getColumn()); $this->assertTrue($this->cellEntry->getCell()->getInputValue() == $newCellEntry->getCell()->getInputValue()); $this->assertTrue($this->cellEntry->getCell()->getNumericValue() == $newCellEntry->getCell()->getNumericValue()); } }