Merge branch 'master' into php8

This commit is contained in:
El RIDO 2022-10-25 06:37:15 +02:00
commit f6edcc1acd
No known key found for this signature in database
GPG key ID: 0F5C940A6BD81F92
48 changed files with 512 additions and 83 deletions

View file

@ -49,6 +49,7 @@ class ControllerTest extends TestCase
*/
public function testView()
{
$_SERVER['HTTP_HOST'] = 'example.com';
$_SERVER['QUERY_STRING'] = Helper::getPasteId();
$_GET[Helper::getPasteId()] = '';
ob_start();
@ -65,6 +66,11 @@ class ControllerTest extends TestCase
$content,
'doesn\'t output shortener button'
);
$this->assertRegExp(
'# href="https://' . preg_quote($_SERVER['HTTP_HOST']) . '/">switching to HTTPS#',
$content,
'outputs configured https URL correctly'
);
}
/**