WordPress.org

Make WordPress Core

Changeset 37519


Ignore:
Timestamp:
05/23/2016 03:25:51 AM (3 years ago)
Author:
boonebgorges
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/term/getTerms.php

    r36691 r37519  
    268268        $term_id1 = self::factory()->tag->create( array( 'slug' => 'burrito' ) );
    269269        $term_id2 = self::factory()->tag->create( array( 'name' => 'Wilbur' ) );
     270        $term_id3 = self::factory()->tag->create( array( 'name' => 'Foo' ) );
    270271
    271272        $terms = get_terms( 'post_tag', array( 'hide_empty' => false, 'search' => 'bur', 'fields' => 'ids' ) );
Note: See TracChangeset for help on using the changeset viewer.