Changeset 48480 for trunk/tests/phpunit/tests/taxonomy.php
- Timestamp:
- 07/14/2020 04:39:44 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/taxonomy.php
r48356 r48480 1000 1000 ); 1001 1001 1002 // Test default category. 1002 1003 $term = wp_get_post_terms( $post_id, $tax ); 1003 1004 $this->assertSame( get_option( 'default_taxonomy_' . $tax ), $term[0]->term_id ); 1005 1006 // Test default term deletion. 1007 $this->assertSame( wp_delete_term( $term[0]->term_id, $tax ), 0 ); 1004 1008 1005 1009 // Add custom post type. … … 1018 1022 $term = wp_get_post_terms( $post_id, $tax ); 1019 1023 $this->assertSame( get_option( 'default_taxonomy_' . $tax ), $term[0]->term_id ); 1024 1025 // wp_set_object_terms shouldn't assign default category. 1026 wp_set_object_terms( $post_id, array(), $tax ); 1027 $term = wp_get_post_terms( $post_id, $tax ); 1028 $this->assertSame( array(), $term ); 1029 1030 unregister_taxonomy( $tax ); 1031 $this->assertSame( get_option( 'default_taxonomy_' . $tax ), false ); 1020 1032 } 1021 1033 }
Note: See TracChangeset
for help on using the changeset viewer.