mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2025-08-03 12:06:40 -04:00
adding tests for YOURLS functionality
This commit is contained in:
parent
4bd5ef9cda
commit
78e915e049
6 changed files with 135 additions and 22 deletions
|
@ -48,6 +48,7 @@ class ControllerTest extends PHPUnit_Framework_TestCase
|
|||
*/
|
||||
public function testView()
|
||||
{
|
||||
$_SERVER['HTTP_HOST'] = 'example.com';
|
||||
$_SERVER['QUERY_STRING'] = Helper::getPasteId();
|
||||
$_GET[Helper::getPasteId()] = '';
|
||||
ob_start();
|
||||
|
@ -64,6 +65,11 @@ class ControllerTest extends PHPUnit_Framework_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'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue