public function RequestStackTest::testGetCurrentRequest in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-foundation/Tests/RequestStackTest.php \Symfony\Component\HttpFoundation\Tests\RequestStackTest::testGetCurrentRequest()
File
- vendor/
symfony/ http-foundation/ Tests/ RequestStackTest.php, line 19
Class
Namespace
Symfony\Component\HttpFoundation\TestsCode
public function testGetCurrentRequest() {
$requestStack = new RequestStack();
$this
->assertNull($requestStack
->getCurrentRequest());
$request = Request::create('/foo');
$requestStack
->push($request);
$this
->assertSame($request, $requestStack
->getCurrentRequest());
$this
->assertSame($request, $requestStack
->pop());
$this
->assertNull($requestStack
->getCurrentRequest());
$this
->assertNull($requestStack
->pop());
}