fix test, basepath needs to be set

This commit is contained in:
El RIDO 2024-06-30 07:45:06 +02:00
parent 2c711e9d3c
commit 8e6e31db5c
No known key found for this signature in database
GPG Key ID: 0F5C940A6BD81F92

View File

@ -325,6 +325,9 @@ class JsonApiTest extends TestCase
*/
public function testShortenViaYourlsFailure()
{
$options = parse_ini_file(CONF, true);
$options['main']['basepath'] = 'https://example.com/path'; // missing slash gets added by Configuration constructor
Helper::createIniFile(CONF, $options);
$_SERVER['REQUEST_URI'] = '/path/shortenviayourls?link=https%3A%2F%2Fexample.com%2Fpath%2F%3Ffoo%23bar';
$_GET['link'] = 'https://example.com/path/?foo#bar';
ob_start();