Merge branch 'master' into burnafterreading-fix, regression in expired paste error

This commit is contained in:
El RIDO 2018-04-30 20:01:38 +02:00
commit caf87cc6f1
No known key found for this signature in database
GPG key ID: 0F5C940A6BD81F92
86 changed files with 3901 additions and 1586 deletions

View file

@ -34,7 +34,6 @@ class ViewTest extends PHPUnit_Framework_TestCase
/* Setup Routine */
$page = new View;
$page->assign('NAME', 'PrivateBinTest');
$page->assign('CIPHERDATA', Helper::getPaste()['data']);
$page->assign('ERROR', self::$error);
$page->assign('STATUS', self::$status);
$page->assign('VERSION', self::$version);
@ -56,6 +55,7 @@ class ViewTest extends PHPUnit_Framework_TestCase
$page->assign('EXPIREDEFAULT', self::$expire_default);
$page->assign('EXPIRECLONE', true);
$page->assign('URLSHORTENER', '');
$page->assign('QRCODE', true);
$dir = dir(PATH . 'tpl');
while (false !== ($file = $dir->read())) {
@ -96,13 +96,6 @@ class ViewTest extends PHPUnit_Framework_TestCase
public function testTemplateRendersCorrectly()
{
foreach ($this->_content as $template => $content) {
$this->assertRegExp(
'#<div[^>]+id="cipherdata"[^>]*>' .
preg_quote(htmlspecialchars(Helper::getPaste()['data'], ENT_NOQUOTES)) .
'</div>#',
$content,
$template . ': outputs data correctly'
);
$this->assertRegExp(
'#<div[^>]+id="errormessage"[^>]*>.*' . self::$error . '#s',
$content,