public function testAddNodeList() { $crawler = new Crawler(); $crawler->addNodeList($this->createNodeList()); $this->assertEquals('foo', $crawler->filterXPath('//div')->attr('class'), '->addNodeList() adds nodes from a \\DOMNodeList'); }
/** * @covers Symfony\Component\DomCrawler\Crawler::addNodeList */ public function testAddNodeList() { if (!class_exists('Symfony\\Component\\CssSelector\\CssSelector')) { $this->markTestSkipped('The "CssSelector" component is not available'); } $crawler = new Crawler(); $crawler->addNodeList($this->createNodeList()); $this->assertEquals('foo', $crawler->filter('div')->attr('class'), '->addNodeList() adds nodes from a \\DOMNodeList'); }