public function OutputRulesTest::testDoctype in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/masterminds/html5/test/HTML5/Serializer/OutputRulesTest.php \Masterminds\HTML5\Tests\Serializer\OutputRulesTest::testDoctype()
File
- vendor/
masterminds/ html5/ test/ HTML5/ Serializer/ OutputRulesTest.php, line 92
Class
Namespace
Masterminds\HTML5\Tests\SerializerCode
public function testDoctype() {
$dom = $this->html5
->loadHTML('<!doctype html><html lang="en"><body>foo</body></html>');
$stream = fopen('php://temp', 'w');
$r = new OutputRules($stream, $this->html5
->getOptions());
$t = new Traverser($dom, $stream, $r, $this->html5
->getOptions());
$m = $this
->getProtectedMethod('doctype');
$m
->invoke($r, 'foo');
$this
->assertEquals("<!DOCTYPE html>" . PHP_EOL, stream_get_contents($stream, -1, 0));
}