publicfunctiontestAddMultipleDocumentNode() { $this->expectException(\InvalidArgumentException::class); $this->expectExceptionMessage('Attaching DOM nodes from multiple documents in the same crawler is forbidden.'); $crawler = $this->createTestCrawler(); $crawler->addHtmlContent($this->getDoctype().'<html><div class="foo"></html>', 'UTF-8'); }