[Wp-unit-tests] [WordPress Unit Tests] #28: Update WPTestUserCapabilities
WordPress Unit Tests
noreply at wordpress.org
Tue Mar 20 22:59:01 UTC 2012
#28: Update WPTestUserCapabilities
--------------------------+--------------------------------
Reporter: kurtpayne | Owner: kurtpayne
Type: defect | Status: new
Priority: minor | Milestone: Fix existing Tests
Component: Capabilities | Version:
Keywords: |
--------------------------+--------------------------------
There are three failures with WPTestUserCapabilities
{{{
1) WPTestUserCapabilities::test_role_add_cap
Failed asserting that false is true.
wp-testcase/test_user_capabilities.php:267
2) WPTestUserCapabilities::test_role_remove_cap
Failed asserting that true is false.
wp-testcase/test_user_capabilities.php:308
3) WPTestUserCapabilities::test_user_remove_all_caps
Failed asserting that '' is null.
wp-testcase/test_user_capabilities.php:445
}}}
Failure 1 and 2 can be fixed by a change in `_flush_roles`. The original
code was commented out in r199 because of a fatal error. The patch works
now, though.
Failure 3 can be fixed by changing the assertion from `assertNull` to
`assertEmpty`. This was changed with WP #15458.
--
Ticket URL: <https://unit-test.trac.wordpress.org/ticket/28>
WordPress Unit Tests <https://unit-test.trac.wordpress.org>
My example project
More information about the wp-unit-tests
mailing list