You are here

public function ClientTest::testSubmit in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/browser-kit/Tests/ClientTest.php \Symfony\Component\BrowserKit\Tests\ClientTest::testSubmit()

File

vendor/symfony/browser-kit/Tests/ClientTest.php, line 306

Class

ClientTest

Namespace

Symfony\Component\BrowserKit\Tests

Code

public function testSubmit() {
  $client = new TestClient();
  $client
    ->setNextResponse(new Response('<html><form action="/foo"><input type="submit" /></form></html>'));
  $crawler = $client
    ->request('GET', 'http://www.example.com/foo/foobar');
  $client
    ->submit($crawler
    ->filter('input')
    ->form());
  $this
    ->assertEquals('http://www.example.com/foo', $client
    ->getRequest()
    ->getUri(), '->submit() submit forms');
}