From 06f945f27840b53e57795dadbc38e76f7e11ab1c Mon Sep 17 00:00:00 2001 From: Horus3 Date: Mon, 24 Feb 2014 16:42:14 +0100 Subject: init --- zend/tests/Zend/Gdata/Spreadsheets/CellTest.php | 67 +++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 zend/tests/Zend/Gdata/Spreadsheets/CellTest.php (limited to 'zend/tests/Zend/Gdata/Spreadsheets/CellTest.php') diff --git a/zend/tests/Zend/Gdata/Spreadsheets/CellTest.php b/zend/tests/Zend/Gdata/Spreadsheets/CellTest.php new file mode 100644 index 0000000..f743d15 --- /dev/null +++ b/zend/tests/Zend/Gdata/Spreadsheets/CellTest.php @@ -0,0 +1,67 @@ +cell = new Zend_Gdata_Spreadsheets_Extension_Cell(); + } + + public function testToAndFromString() + { + $this->cell->setText('test cell'); + $this->assertTrue($this->cell->getText() == 'test cell'); + $this->cell->setRow('1'); + $this->assertTrue($this->cell->getRow() == '1'); + $this->cell->setColumn('2'); + $this->assertTrue($this->cell->getColumn() == '2'); + $this->cell->setInputValue('test input value'); + $this->assertTrue($this->cell->getInputValue() == 'test input value'); + $this->cell->setNumericValue('test numeric value'); + $this->assertTrue($this->cell->getNumericValue() == 'test numeric value'); + + $newCell = new Zend_Gdata_Spreadsheets_Extension_Cell(); + $doc = new DOMDocument(); + $doc->loadXML($this->cell->saveXML()); + $newCell->transferFromDom($doc->documentElement); + $this->assertTrue($this->cell->getText() == $newCell->getText()); + $this->assertTrue($this->cell->getRow() == $newCell->getRow()); + $this->assertTrue($this->cell->getColumn() == $newCell->getColumn()); + $this->assertTrue($this->cell->getInputValue() == $newCell->getInputValue()); + $this->assertTrue($this->cell->getNumericValue() == $newCell->getNumericValue()); + } + +} -- cgit v1.2.3