public function HistoryTest::testForward in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/browser-kit/Tests/HistoryTest.php \Symfony\Component\BrowserKit\Tests\HistoryTest::testForward()
File
- vendor/
symfony/ browser-kit/ Tests/ HistoryTest.php, line 83
Class
Namespace
Symfony\Component\BrowserKit\TestsCode
public function testForward() {
$history = new History();
$history
->add(new Request('http://www.example.com/', 'get'));
$history
->add(new Request('http://www.example1.com/', 'get'));
try {
$history
->forward();
$this
->fail('->forward() throws a \\LogicException if the history is already on the last page');
} catch (\Exception $e) {
$this
->assertInstanceOf('LogicException', $e, '->forward() throws a \\LogicException if the history is already on the last page');
}
$history
->back();
$history
->forward();
$this
->assertSame('http://www.example1.com/', $history
->current()
->getUri(), '->forward() returns the next request in the history');
}