From dd70966885a325922f049ae3d3c249ee8d0c5e60 Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Mon, 23 May 2016 03:25:51 +0000 Subject: [PATCH] Tests: `get_terms()` 'search' test should have more precise fixtures.. Without a fixture that does not match the search term, it's possible for the test to pass even if the search clause isn't built properly. See #13992, #35381. git-svn-id: https://develop.svn.wordpress.org/trunk@37519 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/term/getTerms.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/phpunit/tests/term/getTerms.php b/tests/phpunit/tests/term/getTerms.php index 2095434e88..47e199be48 100644 --- a/tests/phpunit/tests/term/getTerms.php +++ b/tests/phpunit/tests/term/getTerms.php @@ -267,6 +267,7 @@ class Tests_Term_getTerms extends WP_UnitTestCase { function test_get_terms_search() { $term_id1 = self::factory()->tag->create( array( 'slug' => 'burrito' ) ); $term_id2 = self::factory()->tag->create( array( 'name' => 'Wilbur' ) ); + $term_id3 = self::factory()->tag->create( array( 'name' => 'Foo' ) ); $terms = get_terms( 'post_tag', array( 'hide_empty' => false, 'search' => 'bur', 'fields' => 'ids' ) ); $this->assertEqualSets( array( $term_id1, $term_id2 ), $terms );