You are here

public function CrawlerTest::testAddNode 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::testAddNode()

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

File

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

Class

CrawlerTest

Namespace

Symfony\Component\DomCrawler\Tests

Code

public function testAddNode() {
  $crawler = new Crawler();
  $crawler
    ->addNode($this
    ->createNodeList()
    ->item(0));
  $this
    ->assertEquals('foo', $crawler
    ->filterXPath('//div')
    ->attr('class'), '->addNode() adds nodes from a \\DOMElement');
}