protected function createDomDocument() { $dom = new \DOMDocument(); $dom->loadXML('<html><div class="foo"></div></html>'); return $dom; }