PhpOffice\PhpPresentation\Shape\RichText\BreakElement::setText PHP Method

setText() public method

Set text
public setText ( $pText = '' ) : PhpOffice\PhpPresentation\Shape\RichText\TextElementInterface
$pText string Text
return PhpOffice\PhpPresentation\Shape\RichText\TextElementInterface
    public function setText($pText = '')
    {
        return $this;
    }

Usage Example

 /**
  * Test can read
  */
 public function testText()
 {
     $object = new BreakElement();
     $this->assertEquals("\r\n", $object->getText());
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Shape\\RichText\\BreakElement', $object->setText());
     $this->assertEquals("\r\n", $object->getText());
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Shape\\RichText\\BreakElement', $object->setText('AAA'));
     $this->assertEquals("\r\n", $object->getText());
 }