Symfony\Component\DomCrawler\Tests\CrawlerTest::testFilterXPathWithDefaultNamespace PHP Method

testFilterXPathWithDefaultNamespace() public method

    public function testFilterXPathWithDefaultNamespace()
    {
        $crawler = $this->createTestXmlCrawler()->filterXPath('//default:entry/default:id');
        $this->assertCount(1, $crawler, '->filterXPath() automatically registers a namespace');
        $this->assertSame('tag:youtube.com,2008:video:kgZRZmEc9j4', $crawler->text());
    }
CrawlerTest