You are here

public function RequestStackTest::testGetMasterRequest in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-foundation/Tests/RequestStackTest.php \Symfony\Component\HttpFoundation\Tests\RequestStackTest::testGetMasterRequest()

File

vendor/symfony/http-foundation/Tests/RequestStackTest.php, line 35

Class

RequestStackTest

Namespace

Symfony\Component\HttpFoundation\Tests

Code

public function testGetMasterRequest() {
  $requestStack = new RequestStack();
  $this
    ->assertNull($requestStack
    ->getMasterRequest());
  $masterRequest = Request::create('/foo');
  $subRequest = Request::create('/bar');
  $requestStack
    ->push($masterRequest);
  $requestStack
    ->push($subRequest);
  $this
    ->assertSame($masterRequest, $requestStack
    ->getMasterRequest());
}