/** * @test * @depends retrieveNonexistantFragment */ public function fragmentOfFragmentsInHtmlTag() { $html = new Silkworm(); $html->doctype("html"); $html[0] = $html->h1("hello"); $html["zebra"] = $html->span($html->p("stripes")); $html["comment"] = $html->comment("this works"); $html["content"] = $html->div((string) $html[0], (string) $html["comment"], (string) $html["zebra"]); $this->assertSame("<html>\n" . "\t<div>\n" . "\t\t<h1>hello</h1>\n" . "\t\t<!-- this works -->\n" . "\t\t<span>\n" . "\t\t\t<p>stripes</p>\n" . "\t\t</span>\n" . "\t</div>\n" . "</html>\n", (string) $html->html($html["content"]), "Failed to return div tag as parent."); }