WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 5 years ago

#31108 closed enhancement (fixed)

test coverage for check_comment

Reported by: CalEvans Owned by: rachelbaker
Milestone: 4.3 Priority: normal
Severity: normal Version: 4.2
Component: Comments Keywords: has-patch
Focuses: Cc:

Description

The attached patch file adds test coverage for check_comment()

=C=

Attachments (4)

tests_phpunit_tests_comment.php.patch (4.3 KB) - added by CalEvans 6 years ago.
tests_phpunit_tests_comment.php.2.patch (4.3 KB) - added by CalEvans 6 years ago.
Correct file
tests_phpunit_tests_comment.php.3.patch (4.1 KB) - added by CalEvans 6 years ago.
Tightend up the code a bit. This is the last version.
31108.patch (3.7 KB) - added by rachelbaker 5 years ago.
Separated out the tests and made minor formatting adjustments.

Download all attachments as: .zip

Change History (13)

#1 @CalEvans
6 years ago

Ignore the first patch. Use the second one.

=C=

@CalEvans
6 years ago

Tightend up the code a bit. This is the last version.

#2 @rachelbaker
6 years ago

  • Keywords has-patch needs-testing added

#3 @SergeyBiryukov
6 years ago

  • Component changed from Build/Test Tools to Comments

#4 @rachelbaker
5 years ago

  • Milestone changed from Awaiting Review to 4.3
  • Owner set to rachelbaker
  • Status changed from new to accepted

@rachelbaker
5 years ago

Separated out the tests and made minor formatting adjustments.

#5 @rachelbaker
5 years ago

  • Keywords needs-testing removed

This ticket was mentioned in Slack in #core by rachelbaker. View the logs.


5 years ago

This ticket was mentioned in Slack in #core by boone. View the logs.


5 years ago

#8 @boonebgorges
5 years ago

Thanks to you both - these tests look pretty good. There's still a couple of branches in check_comment() that could use coverage ('check_moderation', 'comment_whitelist' for different comment types), but this is a great start.

#9 @boonebgorges
5 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 32519:

Add tests for check_comment().

Props CalEvans, rachelbaker.
Fixes #31108.

Note: See TracTickets for help on using tickets.