Revert [35949].
Passing an object to `wp_list_pluck()` throws also a fatal error, see https://3v4l.org/9YsaD. See #35087. git-svn-id: https://develop.svn.wordpress.org/trunk@35950 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
666d0736f4
commit
019f7ec6b5
|
@ -110,19 +110,6 @@ class Tests_Functions_ListFilter extends WP_UnitTestCase {
|
|||
$this->assertEquals( array( 'f' => 'foo', 'b' => 'bar', 'z' => 'baz' ), $list );
|
||||
}
|
||||
|
||||
/**
|
||||
* When not being passed an array, the function should throw a warning.
|
||||
*
|
||||
* @ticket 35087
|
||||
* @expectedException PHPUnit_Framework_Error_Warning
|
||||
*/
|
||||
function test_wp_list_pluck_non_array() {
|
||||
$object = new stdClass();
|
||||
$object->foo = 'abc';
|
||||
$object->bar = 'def';
|
||||
wp_list_pluck( $object, 'test' );
|
||||
}
|
||||
|
||||
function test_filter_object_list_nested_array_and() {
|
||||
$list = wp_filter_object_list( $this->object_list, array( 'field4' => array( 'blue' ) ), 'AND' );
|
||||
$this->assertEquals( 1, count( $list ) );
|
||||
|
|
Loading…
Reference in New Issue