public function testText() { $object = new Paragraph(); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Shape\\RichText\\Paragraph', $object->addText(new TextElement())); $this->assertcount(1, $object->getRichTextElements()); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Shape\\RichText\\TextElement', $object->createText()); $this->assertcount(2, $object->getRichTextElements()); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Shape\\RichText\\TextElement', $object->createText('AAA')); $this->assertcount(3, $object->getRichTextElements()); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Shape\\RichText\\BreakElement', $object->createBreak()); $this->assertcount(4, $object->getRichTextElements()); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Shape\\RichText\\Run', $object->createTextRun()); $this->assertcount(5, $object->getRichTextElements()); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Shape\\RichText\\Run', $object->createTextRun('BBB')); $this->assertcount(6, $object->getRichTextElements()); $this->assertEquals('AAA' . "\r\n" . 'BBB', $object->getPlainText()); $this->assertEquals('AAA' . "\r\n" . 'BBB', (string) $object); }