[wp-trac] [WordPress Trac] #53363: Test tool and unit test improvements for 5.9

WordPress Trac noreply at wordpress.org
Wed Jul 21 14:34:49 UTC 2021


#53363: Test tool and unit test improvements for 5.9
------------------------------+---------------------
 Reporter:  desrosj           |       Owner:  (none)
     Type:  task (blessed)    |      Status:  new
 Priority:  normal            |   Milestone:  5.9
Component:  Build/Test Tools  |     Version:
 Severity:  normal            |  Resolution:
 Keywords:                    |     Focuses:
------------------------------+---------------------
Changes (by jrf):

 * Attachment "53363-05-custom-assertions-should-have-msg-param.patch"
 added.

 Build/Tests: custom assertions should always have a $message parameter
 All assertions in PHPUnit have a `$message` parameter. Setting this
 parameter allows to distinguish which assertion is failing when a test
 runs multiple assertion, making debugging of the tests easier.  The WP
 custom assertions which are included in the `WP_UnitTestCase_Base` class
 should also allow for this `$message` parameter.  This patch adds this -
 optional - parameter for those assertions which were missing it.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/53363>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list