making unit tests work with spans
This commit is contained in:
parent
85aa072234
commit
d358271451
|
@ -396,11 +396,11 @@ if ($FILEUPLOAD):
|
||||||
<?php
|
<?php
|
||||||
endif;
|
endif;
|
||||||
?>
|
?>
|
||||||
<div id="status" role="alert" class="statusmessage alert alert-info <?php echo empty($STATUS) ? 'hidden' : '' ?>">
|
<div id="status" role="alert" class="statusmessage alert alert-info<?php echo empty($STATUS) ? ' hidden' : '' ?>">
|
||||||
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
|
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
|
||||||
<span class="pl-1"><?php echo htmlspecialchars($STATUS); ?></span>
|
<span class="pl-1"><?php echo htmlspecialchars($STATUS); ?></span>
|
||||||
</div>
|
</div>
|
||||||
<div id="errormessage" role="alert" class="statusmessage <?php echo empty($ERROR) ? 'hidden' : '' ?> alert alert-danger"><span class="glyphicon glyphicon-alert" aria-hidden="true"></span><span class="pl-1"><?php echo htmlspecialchars($ERROR); ?></span></div>
|
<div id="errormessage" role="alert" class="statusmessage<?php echo empty($ERROR) ? ' hidden' : '' ?> alert alert-danger"><span class="glyphicon glyphicon-alert" aria-hidden="true"></span><span class="pl-1"><?php echo htmlspecialchars($ERROR); ?></span></div>
|
||||||
<noscript><div id="noscript" role="alert" class="nonworking alert alert-<?php echo $isDark ? 'error' : 'warning'; ?>"><span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span><?php echo I18n::_('JavaScript is required for %s to work.<br />Sorry for the inconvenience.', I18n::_($NAME)); ?></div></noscript>
|
<noscript><div id="noscript" role="alert" class="nonworking alert alert-<?php echo $isDark ? 'error' : 'warning'; ?>"><span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span><?php echo I18n::_('JavaScript is required for %s to work.<br />Sorry for the inconvenience.', I18n::_($NAME)); ?></div></noscript>
|
||||||
<div id="oldienotice" role="alert" class="hidden nonworking alert alert-danger"><span class="glyphicon glyphicon-alert" aria-hidden="true"></span><?php echo I18n::_('%s requires a modern browser to work.', I18n::_($NAME)); ?></div>
|
<div id="oldienotice" role="alert" class="hidden nonworking alert alert-danger"><span class="glyphicon glyphicon-alert" aria-hidden="true"></span><?php echo I18n::_('%s requires a modern browser to work.', I18n::_($NAME)); ?></div>
|
||||||
<div id="ienotice" role="alert" class="hidden alert alert-<?php echo $isDark ? 'error' : 'warning'; ?>"><span class="glyphicon glyphicon-question-sign" aria-hidden="true"></span><?php echo I18n::_('Still using Internet Explorer? Do yourself a favor, switch to a modern browser:'), PHP_EOL; ?>
|
<div id="ienotice" role="alert" class="hidden alert alert-<?php echo $isDark ? 'error' : 'warning'; ?>"><span class="glyphicon glyphicon-question-sign" aria-hidden="true"></span><?php echo I18n::_('Still using Internet Explorer? Do yourself a favor, switch to a modern browser:'), PHP_EOL; ?>
|
||||||
|
|
|
@ -760,7 +760,7 @@ class PrivateBinTest extends PHPUnit_Framework_TestCase
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
$this->assertRegExp(
|
$this->assertRegExp(
|
||||||
'#<div[^>]*id="errormessage"[^>]*>.*Invalid paste ID\.</div>#',
|
'#<div[^>]*id="errormessage"[^>]*>.*Invalid paste ID\.</#',
|
||||||
$content,
|
$content,
|
||||||
'outputs error correctly'
|
'outputs error correctly'
|
||||||
);
|
);
|
||||||
|
@ -778,7 +778,7 @@ class PrivateBinTest extends PHPUnit_Framework_TestCase
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
$this->assertRegExp(
|
$this->assertRegExp(
|
||||||
'#<div[^>]*id="errormessage"[^>]*>.*Paste does not exist[^<]*</div>#',
|
'#<div[^>]*id="errormessage"[^>]*>.*Paste does not exist, has expired or has been deleted\.</#',
|
||||||
$content,
|
$content,
|
||||||
'outputs error correctly'
|
'outputs error correctly'
|
||||||
);
|
);
|
||||||
|
@ -798,7 +798,7 @@ class PrivateBinTest extends PHPUnit_Framework_TestCase
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
$this->assertRegExp(
|
$this->assertRegExp(
|
||||||
'#<div[^>]*id="errormessage"[^>]*>.*Paste does not exist[^<]*</div>#',
|
'#<div[^>]*id="errormessage"[^>]*>.*Paste does not exist, has expired or has been deleted\.</#',
|
||||||
$content,
|
$content,
|
||||||
'outputs error correctly'
|
'outputs error correctly'
|
||||||
);
|
);
|
||||||
|
@ -939,7 +939,7 @@ class PrivateBinTest extends PHPUnit_Framework_TestCase
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
$this->assertRegExp(
|
$this->assertRegExp(
|
||||||
'#<div[^>]*id="status"[^>]*>.*Paste was properly deleted[^<]*</div>#s',
|
'#<div[^>]*id="status"[^>]*>.*Paste was properly deleted\.</#s',
|
||||||
$content,
|
$content,
|
||||||
'outputs deleted status correctly'
|
'outputs deleted status correctly'
|
||||||
);
|
);
|
||||||
|
@ -960,7 +960,7 @@ class PrivateBinTest extends PHPUnit_Framework_TestCase
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
$this->assertRegExp(
|
$this->assertRegExp(
|
||||||
'#<div[^>]*id="errormessage"[^>]*>.*Invalid paste ID\.</div>#',
|
'#<div[^>]*id="errormessage"[^>]*>.*Invalid paste ID\.</#',
|
||||||
$content,
|
$content,
|
||||||
'outputs delete error correctly'
|
'outputs delete error correctly'
|
||||||
);
|
);
|
||||||
|
@ -980,7 +980,7 @@ class PrivateBinTest extends PHPUnit_Framework_TestCase
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
$this->assertRegExp(
|
$this->assertRegExp(
|
||||||
'#<div[^>]*id="errormessage"[^>]*>.*Paste does not exist[^<]*</div>#',
|
'#<div[^>]*id="errormessage"[^>]*>.*Paste does not exist, has expired or has been deleted\.</#',
|
||||||
$content,
|
$content,
|
||||||
'outputs delete error correctly'
|
'outputs delete error correctly'
|
||||||
);
|
);
|
||||||
|
@ -1000,7 +1000,7 @@ class PrivateBinTest extends PHPUnit_Framework_TestCase
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
$this->assertRegExp(
|
$this->assertRegExp(
|
||||||
'#<div[^>]*id="errormessage"[^>]*>.*Wrong deletion token[^<]*</div>#',
|
'#<div[^>]*id="errormessage"[^>]*>.*Wrong deletion token\. Paste was not deleted\.</#',
|
||||||
$content,
|
$content,
|
||||||
'outputs delete error correctly'
|
'outputs delete error correctly'
|
||||||
);
|
);
|
||||||
|
@ -1067,7 +1067,7 @@ class PrivateBinTest extends PHPUnit_Framework_TestCase
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
$this->assertRegExp(
|
$this->assertRegExp(
|
||||||
'#<div[^>]*id="errormessage"[^>]*>.*Paste does not exist[^<]*</div>#',
|
'#<div[^>]*id="errormessage"[^>]*>.*Paste does not exist, has expired or has been deleted\.</#',
|
||||||
$content,
|
$content,
|
||||||
'outputs error correctly'
|
'outputs error correctly'
|
||||||
);
|
);
|
||||||
|
@ -1091,7 +1091,7 @@ class PrivateBinTest extends PHPUnit_Framework_TestCase
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
$this->assertRegExp(
|
$this->assertRegExp(
|
||||||
'#<div[^>]*id="status"[^>]*>.*Paste was properly deleted[^<]*</div>#s',
|
'#<div[^>]*id="status"[^>]*>.*Paste was properly deleted\.</#s',
|
||||||
$content,
|
$content,
|
||||||
'outputs deleted status correctly'
|
'outputs deleted status correctly'
|
||||||
);
|
);
|
||||||
|
|
|
@ -104,7 +104,7 @@ class ViewTest extends PHPUnit_Framework_TestCase
|
||||||
$template . ': outputs data correctly'
|
$template . ': outputs data correctly'
|
||||||
);
|
);
|
||||||
$this->assertRegExp(
|
$this->assertRegExp(
|
||||||
'#<div[^>]+id="errormessage"[^>]*>.*' . self::$error . '</div>#',
|
'#<div[^>]+id="errormessage"[^>]*>.*' . self::$error . '</#',
|
||||||
$content,
|
$content,
|
||||||
$template . ': outputs error correctly'
|
$template . ': outputs error correctly'
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue