Goose\Tests\Harness\TestTrait::document PHP 메소드

document() 개인적인 메소드

private document ( string $html ) : DOMWrap\Document
$html string
리턴 DOMWrap\Document
    private function document($html)
    {
        $doc = new Document();
        $doc->html($html);
        // Remove the doctype (if it exists) so we can use Document::$firstChild
        if ($doc->doctype instanceof \DOMDocumentType) {
            $doc->removeChild($doc->doctype);
        }
        // Remove any leading ProcessingInstructions
        if ($doc->firstChild instanceof \DOMProcessingInstruction) {
            $doc->removeChild($doc->firstChild);
        }
        return $doc;
    }