Make WordPress Core

Changeset 34627


Ignore:
Timestamp:
09/27/2015 04:09:12 PM (9 years ago)
Author:
boonebgorges
Message:

Move get_term_by() tests to their own file.

Location:
trunk/tests/phpunit/tests
Files:
1 added
1 edited

Legend:

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

    r34246 r34627  
    4747        // clean up
    4848        $this->assertTrue( wp_delete_term($t['term_id'], $this->taxonomy) );
    49     }
    50 
    51     /**
    52      * @ticket 21651
    53      */
    54     function test_get_term_by_tt_id() {
    55         $term1 = wp_insert_term( 'Foo', 'category' );
    56         $term2 = get_term_by( 'term_taxonomy_id', $term1['term_taxonomy_id'], 'category' );
    57         $this->assertEquals( get_term( $term1['term_id'], 'category' ), $term2 );
    58     }
    59 
    60     /**
    61      * @ticket 33281
    62      */
    63     function test_get_term_by_with_nonexistent_id_should_return_false() {
    64         $term = get_term_by( 'id', 123456, 'category' );
    65         $this->assertFalse( $term );
    6649    }
    6750
Note: See TracChangeset for help on using the changeset viewer.