You are here

public function FormTest::testGetUriAbsolute in Zircon Profile 8.0

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

File

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

Class

FormTest

Namespace

Symfony\Component\DomCrawler\Tests

Code

public function testGetUriAbsolute() {
  $form = $this
    ->createForm('<form action="foo"><input type="submit" /></form>', null, 'http://localhost/foo/');
  $this
    ->assertEquals('http://localhost/foo/foo', $form
    ->getUri(), '->getUri() returns absolute URIs');
  $form = $this
    ->createForm('<form action="/foo"><input type="submit" /></form>', null, 'http://localhost/foo/');
  $this
    ->assertEquals('http://localhost/foo', $form
    ->getUri(), '->getUri() returns absolute URIs');
}