assertNull($object->getAuthor()); $this->assertNull($object->getText()); $this->assertInternalType('int', $object->getDate()); $this->assertNull($object->getHeight()); $this->assertNull($object->getWidth()); } public function testGetSetAuthor() { $object = new Comment(); $oStub = $this->getMockBuilder('PhpOffice\PhpPresentation\Shape\Comment\Author')->getMock(); $this->assertNull($object->getAuthor()); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Shape\\Comment', $object->setAuthor($oStub)); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Shape\\Comment\\Author', $object->getAuthor()); } public function testGetSetDate() { $expectedDate = time(); $object = new Comment(); $this->assertInternalType('int', $object->getDate()); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Shape\\Comment', $object->setDate($expectedDate)); $this->assertEquals($expectedDate, $object->getDate()); $this->assertInternalType('int', $object->getDate()); } public function testGetSetText() { $expectedText = 'AABBCCDD'; $object = new Comment(); $this->assertNull($object->getText()); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Shape\\Comment', $object->setText($expectedText)); $this->assertEquals($expectedText, $object->getText()); } public function testGetSetHeightAndWidtg() { $object = new Comment(); $this->assertNull($object->getHeight()); $this->assertNull($object->getWidth()); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Shape\\Comment', $object->setHeight(1)); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Shape\\Comment', $object->setWidth(1)); $this->assertNull($object->getHeight()); $this->assertNull($object->getWidth()); } }