public function test4() { $article = new DOMDocumentArticle(); $article->setXhtml(\file_get_contents(__DIR__ . '/Test4.xml')); $this->assertEquals(array('Mall:Dropfilelist'), $article->getTransclusions()); }
private function getModel($title, $revision = null) { if ($revision == null) { $wikiPage = \WikiPage::factory(\Title::newFromText($title)); $rev = $wikiPage->getRevision(); if ($rev == null) { $this->dieUsage("No existing revision for the article '{$title}'"); } $revision = $rev->getId(); } $xhtml = $this->parsoid->getPageXhtml($title, $revision); $model = new DOMDocumentArticle(); $model->setXhtml($xhtml, $revision); return $model; }