You are here

public function RequestTest::testIISRequestUri in Zircon Profile 8

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

@dataProvider iisRequestUriProvider

File

vendor/symfony/http-foundation/Tests/RequestTest.php, line 1682

Class

RequestTest

Namespace

Symfony\Component\HttpFoundation\Tests

Code

public function testIISRequestUri($headers, $server, $expectedRequestUri) {
  $request = new Request();
  $request->headers
    ->replace($headers);
  $request->server
    ->replace($server);
  $this
    ->assertEquals($expectedRequestUri, $request
    ->getRequestUri(), '->getRequestUri() is correct');
  $subRequestUri = '/bar/foo';
  $subRequest = Request::create($subRequestUri, 'get', array(), array(), array(), $request->server
    ->all());
  $this
    ->assertEquals($subRequestUri, $subRequest
    ->getRequestUri(), '->getRequestUri() is correct in sub request');
}