assertEquals('', $object->getText()); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\Font', $object->getFont()); $object = new Run('BBB'); $this->assertEquals('BBB', $object->getText()); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\Font', $object->getFont()); } public function testFont() { $object = new Run(); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Shape\\RichText\\Run', $object->setFont(new Font())); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\Font', $object->getFont()); } public function testLanguage() { $object = new Run(); $this->assertNull($object->getLanguage()); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Shape\\RichText\\Run', $object->setLanguage('en-US')); $this->assertEquals('en-US', $object->getLanguage()); } public function testText() { $object = new Run(); $this->assertEquals('', $object->getText()); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Shape\\RichText\\Run', $object->setText()); $this->assertEquals('', $object->getText()); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Shape\\RichText\\Run', $object->setText('AAA')); $this->assertEquals('AAA', $object->getText()); $object = new Run('BBB'); $this->assertEquals('BBB', $object->getText()); } /** * Test get/set hash index */ public function testHashCode() { $object = new Run(); $this->assertEquals(md5($object->getFont()->getHashCode().get_class($object)), $object->getHashCode()); } }