You are here

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

File

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

Class

CrawlerTest

Namespace

Symfony\Component\DomCrawler\Tests

Code

public function testFilterXPathWithManuallyRegisteredNamespace() {
  $crawler = $this
    ->createTestXmlCrawler();
  $crawler
    ->registerNamespace('m', 'http://search.yahoo.com/mrss/');
  $crawler = $crawler
    ->filterXPath('//m:group/yt:aspectRatio');
  $this
    ->assertCount(1, $crawler, '->filterXPath() uses manually registered namespace');
  $this
    ->assertSame('widescreen', $crawler
    ->text());
}