From e80d7ad312fb297ff58257556208f3f10ac921c3 Mon Sep 17 00:00:00 2001 From: Dylan Wagstaff Date: Mon, 12 Mar 2018 13:18:22 +1300 Subject: [PATCH] FIX Skip test if optional dependency not present --- tests/CommentsTest.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/CommentsTest.php b/tests/CommentsTest.php index 07c8d84..cc8ee30 100644 --- a/tests/CommentsTest.php +++ b/tests/CommentsTest.php @@ -974,6 +974,11 @@ class CommentsTest extends FunctionalTest public function testPurifyHtml() { + if (!class_exists('HTMLPurifier_Config')) { + $this->markTestSkipped('HTMLPurifier class not found'); + return; + } + $comment = $this->objFromFixture('Comment', 'firstComA'); $dirtyHTML = '

my comment

';