/** * Create text run (can be formatted) * * @param string $pText Text * @return \PhpOffice\PhpPowerpoint\Shape\RichText\Run * @throws \Exception */ public function createTextRun($pText = '') { $objText = new Run($pText); $objText->setFont(clone $this->font); $this->addText($objText); return $objText; }
public function testFont() { $object = new Run(); $this->assertInstanceOf('PhpOffice\\PhpPowerpoint\\Shape\\RichText\\Run', $object->setFont(new Font())); $this->assertInstanceOf('PhpOffice\\PhpPowerpoint\\Style\\Font', $object->getFont()); }