Unit Tests: skip checking the value in `Tests_User:test_user_properties` for `db`. Casting to `array` is not the most elegant thing here, and various versions of PHP key protected/private fields differently when objects are cast.

See [38275], #37699.


git-svn-id: https://develop.svn.wordpress.org/trunk@38278 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2016-08-18 19:37:23 +00:00
parent 83c7544ef8
commit 8c68a5c354
1 changed files with 3 additions and 0 deletions

View File

@ -187,6 +187,9 @@ class Tests_User extends WP_UnitTestCase {
$this->assertEquals( 'foo', $user->data->$key ); // This will fail with WP < 3.3
foreach ( (array) $user as $key => $value ) {
if ( $value instanceof wpdb ) {
continue;
}
$this->assertEquals( $value, $user->$key );
}
}