You are here

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

File

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

Class

CrawlerTest

Namespace

Symfony\Component\DomCrawler\Tests

Code

public function testFilterXPathWithSelfAxes() {
  $crawler = $this
    ->createTestCrawler()
    ->filterXPath('//a');
  $this
    ->assertCount(0, $crawler
    ->filterXPath('self::a'), 'The fake root node has no "real" element name');
  $this
    ->assertCount(0, $crawler
    ->filterXPath('self::a/img'), 'The fake root node has no "real" element name');
  $this
    ->assertCount(9, $crawler
    ->filterXPath('self::*/a'));
}