text() публичный метод

Get the text content of this node and its descendants.
public text ( ) : string
Результат string The node value
Пример #1
0
 public function testSetValue()
 {
     $element = new Element('span', 'hello');
     $element->setValue('test');
     $this->assertEquals('test', $element->text());
 }
Пример #2
0
 public function testText()
 {
     $domElement = $this->createDomElement('input');
     $element = new Element($domElement);
     $this->assertTrue(is_string($element->text()));
 }
Пример #3
0
 public function testText()
 {
     $domElement = $this->createDomElement('span', 'hello');
     $element = new Element($domElement);
     $text = $element->text();
     $this->assertTrue(is_string($text));
     $this->assertEquals('hello', $text);
 }