You are here

public function CrawlerTest::testAddNodes in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/dom-crawler/Tests/CrawlerTest.php \Symfony\Component\DomCrawler\Tests\CrawlerTest::testAddNodes()

@covers Symfony\Component\DomCrawler\Crawler::addNodes

File

vendor/symfony/dom-crawler/Tests/CrawlerTest.php, line 269

Class

CrawlerTest

Namespace

Symfony\Component\DomCrawler\Tests

Code

public function testAddNodes() {
  foreach ($this
    ->createNodeList() as $node) {
    $list[] = $node;
  }
  $crawler = new Crawler();
  $crawler
    ->addNodes($list);
  $this
    ->assertEquals('foo', $crawler
    ->filterXPath('//div')
    ->attr('class'), '->addNodes() adds nodes from an array of nodes');
}