You are here

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

File

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

Class

CrawlerTest

Namespace

Symfony\Component\DomCrawler\Tests

Code

public function testFilterXPathWithChildAxis() {
  $crawler = $this
    ->createTestCrawler()
    ->filterXPath('//div[@id="parent"]');
  $this
    ->assertCount(1, $crawler
    ->filterXPath('child::div'), 'A child selection finds only the current div');
}