Make WordPress Core


Ignore:
Timestamp:
05/15/2014 05:24:54 AM (12 years ago)
Author:
wonderboymusic
Message:

Eliminate the use of extract() in the_taxonomies(). Adds unit test.

See #22400.

File:
1 edited

Legend:

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

    r28415 r28421  
    5050        }
    5151
     52        function test_the_taxonomies() {
     53                $post_id = $this->factory->post->create();
     54
     55                ob_start();
     56                the_taxonomies( array( 'post' => $post_id ) );
     57                $output = ob_get_clean();
     58
     59                $link = get_category_link( 1 );
     60                $expected = "Categories: <a href='$link'>Uncategorized</a>.";
     61                $this->assertEquals( $expected, $output );
     62        }
     63
    5264        function test_get_link_taxonomy() {
    5365                foreach ( get_object_taxonomies('link') as $taxonomy ) {
Note: See TracChangeset for help on using the changeset viewer.