html() public method

Dumps the node into a string using HTML formatting.
public html ( integer $options = LIBXML_NOEMPTYTAG ) : string
$options integer Additional options
return string The node HTML
コード例 #1
0
ファイル: ElementTest.php プロジェクト: imangazaliev/didom
 public function testToString()
 {
     $element = new Element('span', 'hello');
     $this->assertEquals($element->html(), $element->__toString());
 }
コード例 #2
0
ファイル: ElementTest.php プロジェクト: nik4152/DiDOM
 public function testHtml()
 {
     $domElement = $this->createDomElement('input');
     $element = new Element($domElement);
     $this->assertTrue(is_string($element->html()));
     $element = new Element('span', 'hello');
     $this->assertEquals('<span>hello</span>', $element->html());
 }
コード例 #3
0
 public function testHtml()
 {
     $element = new Element('span', 'hello');
     $html = $element->html();
     $this->assertTrue(is_string($html));
     $this->assertEquals('<span>hello</span>', $html);
 }