Tests: Remove redundant `assertEquals()` calls in listFilter tests.

As these tests are already validating that two arrays match, checking that the counts also match before is redundant and makes it harder to debug when the test fails.

See #16895


git-svn-id: https://develop.svn.wordpress.org/trunk@42526 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse 2018-01-18 05:14:28 +00:00
parent 0baa8ae85c
commit ade2dd5dfe
1 changed files with 0 additions and 6 deletions

View File

@ -83,7 +83,6 @@ class Tests_Functions_ListFilter extends WP_UnitTestCase {
'field2' => true,
), 'AND', 'name'
);
$this->assertEquals( 2, count( $list ) );
$this->assertEquals(
array(
'foo' => 'foo',
@ -99,7 +98,6 @@ class Tests_Functions_ListFilter extends WP_UnitTestCase {
'field3' => true,
), 'OR', 'name'
);
$this->assertEquals( 2, count( $list ) );
$this->assertEquals(
array(
'foo' => 'foo',
@ -115,7 +113,6 @@ class Tests_Functions_ListFilter extends WP_UnitTestCase {
'field3' => true,
), 'NOT', 'name'
);
$this->assertEquals( 1, count( $list ) );
$this->assertEquals( array( 'baz' => 'baz' ), $list );
}
@ -247,13 +244,11 @@ class Tests_Functions_ListFilter extends WP_UnitTestCase {
function test_filter_object_list_nested_array_and_field() {
$list = wp_filter_object_list( $this->object_list, array( 'field4' => array( 'blue' ) ), 'AND', 'name' );
$this->assertEquals( 1, count( $list ) );
$this->assertEquals( array( 'baz' => 'baz' ), $list );
}
function test_filter_object_list_nested_array_not_field() {
$list = wp_filter_object_list( $this->object_list, array( 'field4' => array( 'green' ) ), 'NOT', 'name' );
$this->assertEquals( 2, count( $list ) );
$this->assertEquals(
array(
'foo' => 'foo',
@ -269,7 +264,6 @@ class Tests_Functions_ListFilter extends WP_UnitTestCase {
'field4' => array( 'blue' ),
), 'OR', 'name'
);
$this->assertEquals( 2, count( $list ) );
$this->assertEquals(
array(
'foo' => 'foo',