public function testConfigsWithNonRootDirectory()
{
$request = Request::create('/sub/directory/bolt/test/location', 'GET', [], [], [], ['SCRIPT_NAME' => '/sub/directory/index.php', 'PHP_SELF' => '/sub/directory/index.php', 'SCRIPT_FILENAME' => '/path/to/sub/directory/index.php']);
$config = new ResourceManager(new \Pimple(['rootpath' => TEST_ROOT, 'request' => $request, 'pathmanager' => new PlatformFileSystemPathFactory()]));
$app = new Application(['resources' => $config]);
$app['config']->set('general/branding/path', '/custom');
$config->initialize();
$this->assertEquals('/sub/directory/custom/', $config->getUrl('bolt'));
$this->assertEquals('/sub/directory/custom/files/files/', $app['config']->get('general/wysiwyg/filebrowser/imageBrowseUrl'));
}