public function testRenderDTD() { HtmlLeaf::setDTD('html5'); $dtd = new HtmlLeaf(['kind' => '!DOCTYPE']); // Empty content => The static variable HtmlLeaf::$dtd // will be used as element content! $this->assertEquals('<!DOCTYPE html5 >', "{$dtd}"); // If a content is set, it overwrites the default content. $dtd->setCont('html5-test'); $this->assertEquals('<!DOCTYPE html5-test >', "{$dtd}"); }