Example #1
0
 /**
  * @dataProvider rawPathInfoProvider
  * @param string $requestUri
  * @param string $scriptName
  * @param string $expected
  */
 public function testGetRawPathInfoWithoutSetEnv($requestUri, $scriptName, $expected)
 {
     $request = new Request(['server' => ['REQUEST_URI' => $requestUri, 'SCRIPT_NAME' => $scriptName]], $this->secureRandom, $this->getMock('\\OCP\\Security\\ICrypto'), $this->config, $this->stream);
     $this->assertEquals($expected, $request->getRawPathInfo());
 }
Example #2
0
 /**
  * @dataProvider rawPathInfoProvider
  * @param string $requestUri
  * @param string $scriptName
  * @param string $expected
  */
 public function testGetRawPathInfoWithoutSetEnv($requestUri, $scriptName, $expected)
 {
     $request = new Request(['server' => ['REQUEST_URI' => $requestUri, 'SCRIPT_NAME' => $scriptName]], $this->secureRandom, $this->config, $this->csrfTokenManager, $this->stream);
     $this->assertSame($expected, $request->getRawPathInfo());
 }