[wp-trac] [WordPress Trac] #40584: Missing `comment_whitelist` reset in `Tests_Comment_CheckComment::test_should_return_true_when_content_does_not_match_moderation_keys`

WordPress Trac noreply at wordpress.org
Thu Apr 27 16:22:38 UTC 2017


#40584: Missing `comment_whitelist` reset in
`Tests_Comment_CheckComment::test_should_return_true_when_content_does_not_match_moderation_keys`
--------------------------+------------------------------
 Reporter:  stephdau      |       Owner:  boonebgorges
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Comments      |     Version:
 Severity:  normal        |  Resolution:  fixed
 Keywords:  has-patch     |     Focuses:
--------------------------+------------------------------
Changes (by boonebgorges):

 * owner:   => boonebgorges
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"40557"]:
 {{{
 #!CommitTicketReference repository="" revision="40557"
 Fix broken `check_comment()` test.

 The test
 `Tests_Comment_CheckComment::test_should_return_true_when_content_does_not_match_moderation_keys()`
 did not, in fact, test for a `true` value, but for a false one.
 Switching to `assertTrue()` caused a failure, because the test comment
 triggered the 'comment_moderation' test. As in other tests in the file,
 the solution is to force 'comment_moderation' to 0 for the purposes of
 the test.

 Introduced in [32519].

 Props stephdau.
 Fixes #40584.
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/40584#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list