diff --git a/tests/phpunit/tests/comment/checkComment.php b/tests/phpunit/tests/comment/checkComment.php index 0bedc4a919..b33ccd7439 100644 --- a/tests/phpunit/tests/comment/checkComment.php +++ b/tests/phpunit/tests/comment/checkComment.php @@ -83,6 +83,8 @@ class Tests_Comment_CheckComment extends WP_UnitTestCase { } public function test_should_return_true_when_content_does_not_match_moderation_keys() { + update_option( 'comment_whitelist', 0 ); + $author = 'WendytheBuilder'; $author_email = 'wendy@example.com'; $author_url = 'http://example.com'; @@ -93,7 +95,7 @@ class Tests_Comment_CheckComment extends WP_UnitTestCase { update_option( 'moderation_keys',"foo\nbar" ); $results = check_comment( $author, $author_email, $author_url, $comment, $author_ip, $user_agent, $comment_type ); - $this->assertFalse( $results ); + $this->assertTrue( $results ); } public function test_should_return_false_when_link_count_exceeds_comment_max_length_setting() {