You are here

public function FormTest::testGetBaseUri in Zircon Profile 8

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

File

vendor/symfony/dom-crawler/Tests/FormTest.php, line 483

Class

FormTest

Namespace

Symfony\Component\DomCrawler\Tests

Code

public function testGetBaseUri() {
  $dom = new \DOMDocument();
  $dom
    ->loadHTML('<form method="post" action="foo.php"><input type="text" name="bar" value="bar" /><input type="submit" /></form>');
  $nodes = $dom
    ->getElementsByTagName('input');
  $form = new Form($nodes
    ->item($nodes->length - 1), 'http://www.foo.com/');
  $this
    ->assertEquals('http://www.foo.com/foo.php', $form
    ->getUri());
}