public function LinkTest::testGetNode in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/dom-crawler/Tests/LinkTest.php \Symfony\Component\DomCrawler\Tests\LinkTest::testGetNode()
File
- vendor/
symfony/ dom-crawler/ Tests/ LinkTest.php, line 40
Class
Namespace
Symfony\Component\DomCrawler\TestsCode
public function testGetNode() {
$dom = new \DOMDocument();
$dom
->loadHTML('<html><a href="/foo">foo</a></html>');
$node = $dom
->getElementsByTagName('a')
->item(0);
$link = new Link($node, 'http://example.com/');
$this
->assertEquals($node, $link
->getNode(), '->getNode() returns the node associated with the link');
}