// Test request with subdir on homepage.
$server = [
'SCRIPT_NAME' => '/subdir/index.php',
- 'SCRIPT_FILENAME' => \Drupal::root() . '/index.php',
+ 'SCRIPT_FILENAME' => $this->root . '/index.php',
'SERVER_NAME' => 'http://www.example.com',
];
$request = Request::create('/subdir/', 'GET', [], [], [], $server);
// Test request with subdir on other page.
$server = [
'SCRIPT_NAME' => '/subdir/index.php',
- 'SCRIPT_FILENAME' => \Drupal::root() . '/index.php',
+ 'SCRIPT_FILENAME' => $this->root . '/index.php',
'SERVER_NAME' => 'http://www.example.com',
];
$request = Request::create('/subdir/node/add', 'GET', [], [], [], $server);
// Test request without subdir on the homepage.
$server = [
'SCRIPT_NAME' => '/index.php',
- 'SCRIPT_FILENAME' => \Drupal::root() . '/index.php',
+ 'SCRIPT_FILENAME' => $this->root . '/index.php',
'SERVER_NAME' => 'http://www.example.com',
];
$request = Request::create('/', 'GET', [], [], [], $server);
// Test request without subdir on other page.
$server = [
'SCRIPT_NAME' => '/index.php',
- 'SCRIPT_FILENAME' => \Drupal::root() . '/index.php',
+ 'SCRIPT_FILENAME' => $this->root . '/index.php',
'SERVER_NAME' => 'http://www.example.com',
];
$request = Request::create('/node/add', 'GET', [], [], [], $server);
// not found exception page.
$server = [
'SCRIPT_NAME' => '/index.php',
- 'SCRIPT_FILENAME' => \Drupal::root() . '/index.php',
+ 'SCRIPT_FILENAME' => $this->root . '/index.php',
'SERVER_NAME' => 'http://www.example.com',
];
$request = Request::create('/invalid-path', 'GET', [], [], [], $server);