Changeset 54090 for trunk/tests/phpunit/tests/post/wpPublishPost.php
- Timestamp:
- 09/06/2022 10:09:49 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/post/wpPublishPost.php
r53783 r54090 143 143 public function test_wp_publish_post_respects_current_categories() { 144 144 $post_id = self::$auto_draft_id; 145 $category_id = $this->factory->term->create( array( 'taxonomy' => 'category' ) );145 $category_id = self::factory()->term->create( array( 'taxonomy' => 'category' ) ); 146 146 wp_set_post_categories( $post_id, $category_id ); 147 147 wp_publish_post( $post_id ); … … 184 184 public function test_wp_publish_post_adds_default_category_when_tagged() { 185 185 $post_id = self::$auto_draft_id; 186 $tag_id = $this->factory->term->create( array( 'taxonomy' => 'post_tag' ) );186 $tag_id = self::factory()->term->create( array( 'taxonomy' => 'post_tag' ) ); 187 187 wp_set_post_tags( $post_id, array( $tag_id ) ); 188 188 wp_publish_post( $post_id ); … … 219 219 220 220 $post_id = self::$auto_draft_id; 221 $term_id = $this->factory->term->create( array( 'taxonomy' => 'tax_51292' ) );221 $term_id = self::factory()->term->create( array( 'taxonomy' => 'tax_51292' ) ); 222 222 wp_set_object_terms( $post_id, array( $term_id ), 'tax_51292' ); 223 223 wp_publish_post( $post_id );
Note: See TracChangeset
for help on using the changeset viewer.