addNodeList() публичный Метод

Adds a \DOMNodeList to the list of nodes.
public addNodeList ( DOMNodeList $nodes )
$nodes DOMNodeList A \DOMNodeList instance
Пример #1
0
 public function testAddNodeList()
 {
     $crawler = new Crawler();
     $crawler->addNodeList($this->createNodeList());
     $this->assertEquals('foo', $crawler->filterXPath('//div')->attr('class'), '->addNodeList() adds nodes from a \\DOMNodeList');
 }
Пример #2
0
 /**
  * @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');
 }