Make WordPress Core

Ticket #45163: 45163_unittest.patch

File 45163_unittest.patch, 624 bytes (added by esoj, 5 years ago)

Unittest for this issue

  • tests/phpunit/tests/term/getTermBy.php

     
    3333        }
    3434
    3535        /**
     36         * @ticket 45163
     37         */
     38        function test_get_term_by_uppercase_id() {
     39                $term1 = wp_insert_term( 'Foo', 'category', array( 'slug' => 'foo' ) );
     40                $term2 = get_term_by( 'ID', $term1['term_id'], 'category' );
     41                $this->assertEquals( get_term( $term1['term_id'], 'category' ), $term2 );
     42        }       
     43
     44        /**
    3645         * @ticket 21651
    3746         */
    3847        function test_get_term_by_tt_id() {