]>
git.immae.eu Git - github/shaarli/Shaarli.git/blob - tests/http/HttpUtils/IndexUrlTestWithConstant.php
3 declare(strict_types
=1);
5 namespace Shaarli\Http
;
10 * Test index_url with SHAARLI_ROOT_URL defined to override automatic retrieval.
11 * This should stay in its dedicated class to make sure to not alter other tests of the suite.
13 class IndexUrlTestWithConstant
extends TestCase
15 public static function setUpBeforeClass(): void
17 define('SHAARLI_ROOT_URL', 'http://other-host.tld/subfolder/');
21 * The route is stored in REQUEST_URI and subfolder
23 public function testIndexUrlWithConstantDefined()
26 'http://other-host.tld/subfolder/',
30 'SERVER_NAME' => 'host.tld',
31 'SERVER_PORT' => '80',
32 'SCRIPT_NAME' => '/index.php',
33 'REQUEST_URI' => '/picture-wall',
39 'http://other-host.tld/subfolder/',
43 'SERVER_NAME' => 'host.tld',
44 'SERVER_PORT' => '80',
45 'SCRIPT_NAME' => '/admin/index.php',
46 'REQUEST_URI' => '/admin/picture-wall',