public setText ( $pText = '' ) : PhpOffice\PhpPresentation\Shape\RichText\TextElementInterface | ||
$pText | string Text | |
Результат | PhpOffice\PhpPresentation\Shape\RichText\TextElementInterface |
public function setText($pText = '')
{
$this->text = $pText;
return $this;
}
public function testText() { $object = new TextElement(); $this->assertEquals('', $object->getText()); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Shape\\RichText\\TextElement', $object->setText()); $this->assertEquals('', $object->getText()); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Shape\\RichText\\TextElement', $object->setText('AAA')); $this->assertEquals('AAA', $object->getText()); }