assertEmpty($object->getRows()); $this->assertFalse($object->isResizeProportional()); } public function testNumColums() { $value = rand(1, 100); $object = new Table(); $this->assertEquals(1, $object->getNumColumns()); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Shape\\Table', $object->setNumColumns($value)); $this->assertEquals($value, $object->getNumColumns()); } public function testRows() { $object = new Table(); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Shape\\Table\\Row', $object->createRow()); $this->assertCount(1, $object->getRows()); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Shape\\Table\\Row', $object->getRow(0)); $this->assertNull($object->getRow(1, true)); } /** * @expectedException \Exception * expectedExceptionMessage Row number out of bounds. */ public function testGetRowException() { $object = new Table(); $object->getRow(); } public function testHashCode() { $object = new Table(); $this->assertEquals(md5(get_class($object)), $object->getHashCode()); $row = $object->createRow(); $this->assertEquals(md5($row->getHashCode().get_class($object)), $object->getHashCode()); } }