public function CrawlerTest::testAddHtmlContentInvalidBaseTag 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::testAddHtmlContentInvalidBaseTag()
@covers Symfony\Component\DomCrawler\Crawler::addHtmlContent
File
- vendor/
symfony/ dom-crawler/ Tests/ CrawlerTest.php, line 97
Class
Namespace
Symfony\Component\DomCrawler\TestsCode
public function testAddHtmlContentInvalidBaseTag() {
$crawler = new Crawler(null, 'http://symfony.com');
$crawler
->addHtmlContent('<html><head><base target="_top"></head><a href="/contact"></a></html>', 'UTF-8');
$this
->assertEquals('http://symfony.com/contact', current($crawler
->filterXPath('//a')
->links())
->getUri(), '->addHtmlContent() correctly handles a non-existent base tag href attribute');
}