public function HistoryTest::testAdd 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::testAdd()
File
- vendor/
symfony/ browser-kit/ Tests/ HistoryTest.php, line 19
Class
Namespace
Symfony\Component\BrowserKit\TestsCode
public function testAdd() {
$history = new History();
$history
->add(new Request('http://www.example1.com/', 'get'));
$this
->assertSame('http://www.example1.com/', $history
->current()
->getUri(), '->add() adds a request to the history');
$history
->add(new Request('http://www.example2.com/', 'get'));
$this
->assertSame('http://www.example2.com/', $history
->current()
->getUri(), '->add() adds a request to the history');
$history
->add(new Request('http://www.example3.com/', 'get'));
$history
->back();
$history
->add(new Request('http://www.example4.com/', 'get'));
$this
->assertSame('http://www.example4.com/', $history
->current()
->getUri(), '->add() adds a request to the history');
$history
->back();
$this
->assertSame('http://www.example2.com/', $history
->current()
->getUri(), '->add() adds a request to the history');
}