You are here

public function LinkTest::testConstructorWithANonATag in Zircon Profile 8

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

@expectedException \LogicException

File

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

Class

LinkTest

Namespace

Symfony\Component\DomCrawler\Tests

Code

public function testConstructorWithANonATag() {
  $dom = new \DOMDocument();
  $dom
    ->loadHTML('<html><div><div></html>');
  new Link($dom
    ->getElementsByTagName('div')
    ->item(0), 'http://www.example.com/');
}