You are here

public function LinkTest::testGetUriOnLink in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/dom-crawler/Tests/LinkTest.php \Symfony\Component\DomCrawler\Tests\LinkTest::testGetUriOnLink()

@dataProvider getGetUriTests

File

vendor/symfony/dom-crawler/Tests/LinkTest.php, line 92

Class

LinkTest

Namespace

Symfony\Component\DomCrawler\Tests

Code

public function testGetUriOnLink($url, $currentUri, $expected) {
  $dom = new \DOMDocument();
  $dom
    ->loadHTML(sprintf('<html><head><link href="%s" /></head></html>', $url));
  $link = new Link($dom
    ->getElementsByTagName('link')
    ->item(0), $currentUri);
  $this
    ->assertEquals($expected, $link
    ->getUri());
}