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

Get the text content of this node and its descendants.
public text ( ) : string
Результат string
Пример #1
0
 public function testText()
 {
     $html = $this->loadFixture('posts.html');
     $document = new Document($html, false);
     $this->assertTrue(is_string($document->text()));
 }
Пример #2
0
 public function testText()
 {
     $html = '<html>foo</html>';
     $document = new Document($html, false);
     $this->assertEquals('foo', $document->text());
 }