WordPress.org

Make WordPress Core

Changeset 36778


Ignore:
Timestamp:
02/29/2016 08:30:04 PM (4 years ago)
Author:
boonebgorges
Message:

Make sure an assertion takes place in 'visited' test for get_category_parents().

See #36016.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/category/getCategoryParents.php

    r35242 r36778  
    5151    }
    5252
    53     public function test_visited() {
     53    public function test_visited_should_also_exclude_children_of_visited_categories() {
    5454        $c3 = self::factory()->category->create_and_get( array(
    5555            'parent' => $this->c2->term_id,
     
    5959        ) );
    6060
    61         $expected = $this->c1->name . '/'. $this->c2->name . '/' . $c4->name . '/';
     61        $expected = $this->c1->name . '/'. $this->c2->name . '/';
    6262        $found = get_category_parents( $this->c2->term_id, false, '/', false, array( $c3->term_id ) );
     63        $this->assertSame( $expected, $found );
    6364    }
    6465}
Note: See TracChangeset for help on using the changeset viewer.