[wp-trac] [WordPress Trac] #39868: add unit tests for wp_validate_boolean() in function.php
WordPress Trac
noreply at wordpress.org
Sat Sep 21 01:18:02 UTC 2019
#39868: add unit tests for wp_validate_boolean() in function.php
------------------------------+----------------------
Reporter: pbearne | Owner: desrosj
Type: enhancement | Status: closed
Priority: normal | Milestone: 5.3
Component: Build/Test Tools | Version: 4.8
Severity: normal | Resolution: fixed
Keywords: has-patch | Focuses:
------------------------------+----------------------
Comment (by jrf):
This patch has changed the test to a loose type comparison of the
`$result` to `$expected` which will allow for type juggling and basically
means the method is not actually being tested correctly anymore. I'll
upload a patch shortly to fix this.
Refs:
*
https://phpunit.de/manual/6.5/en/appendixes.assertions.html#appendixes.assertions.assertEquals
*
https://phpunit.de/manual/6.5/en/appendixes.assertions.html#appendixes.assertions.assertSame
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39868#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list