Changeset 35225 for trunk/tests/phpunit/tests/term.php
- Timestamp:
- 10/16/2015 09:04:12 PM (10 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/term.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/term.php
r35186 r35225 24 24 ) ); 25 25 26 $parent = $this->factory->term->create( array(27 'taxonomy' => 'wptests_tax', 28 ) ); 29 30 $child = $this->factory->term->create( array(26 $parent = self::$factory->term->create( array( 27 'taxonomy' => 'wptests_tax', 28 ) ); 29 30 $child = self::$factory->term->create( array( 31 31 'taxonomy' => 'wptests_tax', 32 32 'parent' => $parent, … … 227 227 register_taxonomy( 'wptests_tax', 'post' ); 228 228 $p = self::$post_ids[0]; 229 $t1 = $this->factory->term->create( array(230 'taxonomy' => 'wptests_tax', 231 ) ); 232 $t2 = $this->factory->term->create( array(229 $t1 = self::$factory->term->create( array( 230 'taxonomy' => 'wptests_tax', 231 ) ); 232 $t2 = self::$factory->term->create( array( 233 233 'taxonomy' => 'wptests_tax', 234 234 ) ); … … 248 248 register_taxonomy( 'wptests_tax', 'post' ); 249 249 $p = self::$post_ids[0]; 250 $t1 = $this->factory->term->create( array(251 'taxonomy' => 'wptests_tax', 252 ) ); 253 $t2 = $this->factory->term->create( array(250 $t1 = self::$factory->term->create( array( 251 'taxonomy' => 'wptests_tax', 252 ) ); 253 $t2 = self::$factory->term->create( array( 254 254 'taxonomy' => 'wptests_tax', 255 255 ) ); … … 269 269 register_taxonomy( 'wptests_tax', 'post' ); 270 270 $p = self::$post_ids[0]; 271 $t1 = $this->factory->term->create( array(272 'taxonomy' => 'wptests_tax', 273 ) ); 274 $t2 = $this->factory->term->create( array(271 $t1 = self::$factory->term->create( array( 272 'taxonomy' => 'wptests_tax', 273 ) ); 274 $t2 = self::$factory->term->create( array( 275 275 'taxonomy' => 'wptests_tax', 276 276 ) ); … … 365 365 function test_wp_add_remove_object_terms() { 366 366 $posts = self::$post_ids; 367 $tags = $this->factory->tag->create_many( 5 );367 $tags = self::$factory->tag->create_many( 5 ); 368 368 369 369 $tt = wp_add_object_terms( $posts[0], $tags[1], 'post_tag' ); … … 524 524 function test_object_term_cache_when_term_changes() { 525 525 $post_id = self::$post_ids[0]; 526 $tag_id = $this->factory->tag->create( array(526 $tag_id = self::$factory->tag->create( array( 527 527 'name' => 'Amaze Tag', 528 528 'description' => 'My Amazing Tag' … … 554 554 $p = self::$post_ids[0]; 555 555 register_taxonomy( 'wptests_tax', 'post' ); 556 $t = $this->factory->term->create( array( 'taxonomy' => 'wptests_tax' ) );556 $t = self::$factory->term->create( array( 'taxonomy' => 'wptests_tax' ) ); 557 557 wp_set_object_terms( $p, $t, 'wptests_tax' ); 558 558 … … 573 573 $p = self::$post_ids[0]; 574 574 register_taxonomy( 'wptests_tax', 'post' ); 575 $t = $this->factory->term->create( array( 'taxonomy' => 'wptests_tax' ) );575 $t = self::$factory->term->create( array( 'taxonomy' => 'wptests_tax' ) ); 576 576 wp_set_object_terms( $p, $t, 'wptests_tax' ); 577 577 … … 619 619 */ 620 620 function test_orphan_category() { 621 $cat_id1 = $this->factory->category->create();621 $cat_id1 = self::$factory->category->create(); 622 622 623 623 wp_delete_category( $cat_id1 ); 624 624 625 $cat_id2 = $this->factory->category->create( array( 'parent' => $cat_id1 ) );625 $cat_id2 = self::$factory->category->create( array( 'parent' => $cat_id1 ) ); 626 626 $this->assertWPError( $cat_id2 ); 627 627 }
Note: See TracChangeset
for help on using the changeset viewer.