public function RequestTest::testGetScriptName in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-foundation/Tests/RequestTest.php \Symfony\Component\HttpFoundation\Tests\RequestTest::testGetScriptName()
File
- vendor/
symfony/ http-foundation/ Tests/ RequestTest.php, line 1148
Class
Namespace
Symfony\Component\HttpFoundation\TestsCode
public function testGetScriptName() {
$request = new Request();
$this
->assertEquals('', $request
->getScriptName());
$server = array();
$server['SCRIPT_NAME'] = '/index.php';
$request
->initialize(array(), array(), array(), array(), array(), $server);
$this
->assertEquals('/index.php', $request
->getScriptName());
$server = array();
$server['ORIG_SCRIPT_NAME'] = '/frontend.php';
$request
->initialize(array(), array(), array(), array(), array(), $server);
$this
->assertEquals('/frontend.php', $request
->getScriptName());
$server = array();
$server['SCRIPT_NAME'] = '/index.php';
$server['ORIG_SCRIPT_NAME'] = '/frontend.php';
$request
->initialize(array(), array(), array(), array(), array(), $server);
$this
->assertEquals('/index.php', $request
->getScriptName());
}