You are here

public function RequestTest::testGetPathInfo in Zircon Profile 8.0

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

File

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

Class

RequestTest

Namespace

Symfony\Component\HttpFoundation\Tests

Code

public function testGetPathInfo() {
  $request = new Request();
  $this
    ->assertEquals('/', $request
    ->getPathInfo());
  $server = array();
  $server['REQUEST_URI'] = '/path/info';
  $request
    ->initialize(array(), array(), array(), array(), array(), $server);
  $this
    ->assertEquals('/path/info', $request
    ->getPathInfo());
  $server = array();
  $server['REQUEST_URI'] = '/path%20test/info';
  $request
    ->initialize(array(), array(), array(), array(), array(), $server);
  $this
    ->assertEquals('/path%20test/info', $request
    ->getPathInfo());
}