public function CrawlerTest::testFilterXPathWithCustomDefaultNamespace in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/dom-crawler/Tests/CrawlerTest.php \Symfony\Component\DomCrawler\Tests\CrawlerTest::testFilterXPathWithCustomDefaultNamespace()
File
- vendor/
symfony/ dom-crawler/ Tests/ CrawlerTest.php, line 456
Class
Namespace
Symfony\Component\DomCrawler\TestsCode
public function testFilterXPathWithCustomDefaultNamespace() {
$crawler = $this
->createTestXmlCrawler();
$crawler
->setDefaultNamespacePrefix('x');
$crawler = $crawler
->filterXPath('//x:entry/x:id');
$this
->assertCount(1, $crawler, '->filterXPath() lets to override the default namespace prefix');
$this
->assertSame('tag:youtube.com,2008:video:kgZRZmEc9j4', $crawler
->text());
}