FIX Skip test if optional dependency not present

This commit is contained in:
Dylan Wagstaff 2018-03-12 13:18:22 +13:00
parent dc6ea3934d
commit e80d7ad312

View File

@ -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>';