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
Exemplo n.º 1
0
 public function testToString()
 {
     $element = new Element('span', 'hello');
     $this->assertEquals($element->html(), $element->__toString());
 }
Exemplo n.º 2
0
 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());
 }
Exemplo n.º 3
0
 public function testHtml()
 {
     $element = new Element('span', 'hello');
     $html = $element->html();
     $this->assertTrue(is_string($html));
     $this->assertEquals('<span>hello</span>', $html);
 }