/** * @dataProvider pathInfoProvider * @param string $requestUri * @param string $scriptName * @param string $expected */ public function testGetPathInfoWithoutSetEnv($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->getPathInfo()); }
/** * @dataProvider pathInfoProvider * @param string $requestUri * @param string $scriptName * @param string $expected */ public function testGetPathInfoWithoutSetEnv($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->getPathInfo()); }