mirror of
https://github.com/silverstripe/silverstripe-comments
synced 2024-10-22 11:05:49 +02:00
FIX Skip test if optional dependency not present
This commit is contained in:
parent
dc6ea3934d
commit
e80d7ad312
@ -974,6 +974,11 @@ class CommentsTest extends FunctionalTest
|
|||||||
|
|
||||||
public function testPurifyHtml()
|
public function testPurifyHtml()
|
||||||
{
|
{
|
||||||
|
if (!class_exists('HTMLPurifier_Config')) {
|
||||||
|
$this->markTestSkipped('HTMLPurifier class not found');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$comment = $this->objFromFixture('Comment', 'firstComA');
|
$comment = $this->objFromFixture('Comment', 'firstComA');
|
||||||
|
|
||||||
$dirtyHTML = '<p><script>alert("w00t")</script>my comment</p>';
|
$dirtyHTML = '<p><script>alert("w00t")</script>my comment</p>';
|
||||||
|
Loading…
Reference in New Issue
Block a user