getText()); } /** * Get style null. */ public function testStyleNull(): void { $oTitle = new Title('text'); self::assertNull($oTitle->getStyle()); } /** * Create new instance with TextRun. */ public function testConstructWithTextRun(): void { $oTextRun = new TextRun(); $oTextRun->addText('text'); $oTitle = new Title($oTextRun); self::assertInstanceOf('PhpOffice\\PhpWord\\Element\\TextRun', $oTitle->getText()); } public function testConstructWithInvalidArgument(): void { $this->expectException(InvalidArgumentException::class); $oPageBreak = new PageBreak(); new Title($oPageBreak); } }