public function HistoryTest::testCurrent 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::testCurrent()
File
- vendor/
symfony/ browser-kit/ Tests/ HistoryTest.php, line 49
Class
Namespace
Symfony\Component\BrowserKit\TestsCode
public function testCurrent() {
$history = new History();
try {
$history
->current();
$this
->fail('->current() throws a \\LogicException if the history is empty');
} catch (\Exception $e) {
$this
->assertInstanceOf('LogicException', $e, '->current() throws a \\LogicException if the history is empty');
}
$history
->add(new Request('http://www.example.com/', 'get'));
$this
->assertSame('http://www.example.com/', $history
->current()
->getUri(), '->current() returns the current request in the history');
}