__toString() public method

Convert the document to its string representation.
public __toString ( ) : string
return string
Beispiel #1
0
 public function testToString()
 {
     $html = $this->loadFixture('posts.html');
     $document = new Document($html, false);
     $this->assertEquals($document->html(), $document->__toString());
 }
Beispiel #2
0
 public function testToStringXml()
 {
     $xml = $this->loadFixture('books.xml');
     $document = new Document($xml, false, 'UTF-8', 'xml');
     $this->assertEquals($document->xml(), $document->__toString());
 }