public function ClientTest::testForward in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/browser-kit/Tests/ClientTest.php \Symfony\Component\BrowserKit\Tests\ClientTest::testForward()
File
- vendor/
symfony/ browser-kit/ Tests/ ClientTest.php, line 515
Class
Namespace
Symfony\Component\BrowserKit\TestsCode
public function testForward() {
$client = new TestClient();
$parameters = array(
'foo' => 'bar',
);
$files = array(
'myfile.foo' => 'baz',
);
$server = array(
'X_TEST_FOO' => 'bazbar',
);
$content = 'foobarbaz';
$client
->request('GET', 'http://www.example.com/foo/foobar');
$client
->request('GET', 'http://www.example.com/foo', $parameters, $files, $server, $content);
$client
->back();
$client
->forward();
$this
->assertEquals('http://www.example.com/foo', $client
->getRequest()
->getUri(), '->forward() goes forward in the history');
$this
->assertArrayHasKey('foo', $client
->getRequest()
->getParameters(), '->forward() keeps parameters');
$this
->assertArrayHasKey('myfile.foo', $client
->getRequest()
->getFiles(), '->forward() keeps files');
$this
->assertArrayHasKey('X_TEST_FOO', $client
->getRequest()
->getServer(), '->forward() keeps $_SERVER');
$this
->assertEquals($content, $client
->getRequest()
->getContent(), '->forward() keeps content');
}