Changeset 28415 for trunk/tests/phpunit/tests/taxonomy.php
- Timestamp:
- 05/15/2014 03:50:46 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/taxonomy.php
r28374 r28415 34 34 } 35 35 36 function test_get_the_taxonomies() { 37 $post_id = $this->factory->post->create(); 38 39 $taxes = get_the_taxonomies( $post_id ); 40 $this->assertNotEmpty( $taxes ); 41 $this->assertEquals( array( 'category' ), array_keys( $taxes ) ); 42 43 $id = $this->factory->tag->create(); 44 wp_set_post_tags( $post_id, array( $id ) ); 45 46 $taxes = get_the_taxonomies( $post_id ); 47 $this->assertNotEmpty( $taxes ); 48 $this->assertCount( 2, $taxes ); 49 $this->assertEquals( array( 'category', 'post_tag' ), array_keys( $taxes ) ); 50 } 51 36 52 function test_get_link_taxonomy() { 37 53 foreach ( get_object_taxonomies('link') as $taxonomy ) {
Note: See TracChangeset
for help on using the changeset viewer.