assertInstanceOf(DoctypeInterface::class, $document->doctype()); $this->assertInstanceOf(HtmlTagInterface::class, $document->html()); $this->assertInstanceOf(BodyTagInterface::class, $document->body()); $this->assertInstanceOf(HeadTagInterface::class, $document->head()); // body and head are being passed properly $this->assertTrue($document->body() === $document->html()->body()); $this->assertTrue($document->head() === $document->html()->head()); // everything has the correct document $this->assertEquals($document, $document->doctype()->document()); $this->assertEquals($document, $document->html()->document()); $this->assertEquals($document, $document->body()->document()); $this->assertEquals($document, $document->head()->document()); // children are doctype and html $this->assertEquals([$document->doctype(), $document->html()], $document->children()); // string version of an empty document $this->assertEquals( implode( PHP_EOL, [ '', '', '
', '