Changeset 35225 for trunk/tests/phpunit/tests/term/isObjectInTerm.php
- Timestamp:
- 10/16/2015 09:04:12 PM (11 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/term/isObjectInTerm.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/term/isObjectInTerm.php
r34812 r35225 8 8 register_taxonomy( 'wptests_tax', 'post' ); 9 9 10 $t1 = $this->factory->term->create( array( 'taxonomy' => 'wptests_tax' ) );11 $t2 = $this->factory->term->create( array( 'taxonomy' => 'wptests_tax' ) );10 $t1 = self::$factory->term->create( array( 'taxonomy' => 'wptests_tax' ) ); 11 $t2 = self::$factory->term->create( array( 'taxonomy' => 'wptests_tax' ) ); 12 12 13 $posts = $this->factory->post->create_many( 2 );13 $posts = self::$factory->post->create_many( 2 ); 14 14 wp_set_object_terms( $posts[0], array( $t1 ), 'wptests_tax' ); 15 15 … … 23 23 register_taxonomy( 'wptests_tax', 'post' ); 24 24 25 $t1 = $this->factory->term->create( array( 'taxonomy' => 'wptests_tax' ) );26 $t2 = $this->factory->term->create( array( 'taxonomy' => 'wptests_tax' ) );25 $t1 = self::$factory->term->create( array( 'taxonomy' => 'wptests_tax' ) ); 26 $t2 = self::$factory->term->create( array( 'taxonomy' => 'wptests_tax' ) ); 27 27 28 $posts = $this->factory->post->create_many( 2 );28 $posts = self::$factory->post->create_many( 2 ); 29 29 wp_set_object_terms( $posts[0], array( $t1 ), 'wptests_tax' ); 30 30 … … 41 41 register_taxonomy( 'wptests_tax', 'post' ); 42 42 43 $t1 = $this->factory->term->create( array( 'taxonomy' => 'wptests_tax', 'name' => 'Foo' ) );44 $t2 = $this->factory->term->create( array( 'taxonomy' => 'wptests_tax', 'name' => 'Bar') );43 $t1 = self::$factory->term->create( array( 'taxonomy' => 'wptests_tax', 'name' => 'Foo' ) ); 44 $t2 = self::$factory->term->create( array( 'taxonomy' => 'wptests_tax', 'name' => 'Bar') ); 45 45 46 $posts = $this->factory->post->create_many( 2 );46 $posts = self::$factory->post->create_many( 2 ); 47 47 wp_set_object_terms( $posts[0], array( $t1 ), 'wptests_tax' ); 48 48 … … 56 56 register_taxonomy( 'wptests_tax', 'post' ); 57 57 58 $t1 = $this->factory->term->create( array( 'taxonomy' => 'wptests_tax', 'slug' => 'foo' ) );59 $t2 = $this->factory->term->create( array( 'taxonomy' => 'wptests_tax', 'slug' => 'bar') );58 $t1 = self::$factory->term->create( array( 'taxonomy' => 'wptests_tax', 'slug' => 'foo' ) ); 59 $t2 = self::$factory->term->create( array( 'taxonomy' => 'wptests_tax', 'slug' => 'bar') ); 60 60 61 $posts = $this->factory->post->create_many( 2 );61 $posts = self::$factory->post->create_many( 2 ); 62 62 wp_set_object_terms( $posts[0], array( $t1 ), 'wptests_tax' ); 63 63 … … 71 71 register_taxonomy( 'wptests_tax', 'post' ); 72 72 73 $t1 = $this->factory->term->create( array( 'taxonomy' => 'wptests_tax', 'slug' => 'foo' ) );74 $t2 = $this->factory->term->create( array( 'taxonomy' => 'wptests_tax', 'slug' => 'bar') );73 $t1 = self::$factory->term->create( array( 'taxonomy' => 'wptests_tax', 'slug' => 'foo' ) ); 74 $t2 = self::$factory->term->create( array( 'taxonomy' => 'wptests_tax', 'slug' => 'bar') ); 75 75 76 $posts = $this->factory->post->create_many( 2 );76 $posts = self::$factory->post->create_many( 2 ); 77 77 wp_set_object_terms( $posts[0], array( $t1 ), 'wptests_tax' ); 78 78 … … 88 88 public function test_should_not_return_true_if_term_name_begins_with_existing_term_id() { 89 89 register_taxonomy( 'wptests_tax', 'post' ); 90 $t = $this->factory->term->create( array( 'taxonomy' => 'wptests_tax' ) );90 $t = self::$factory->term->create( array( 'taxonomy' => 'wptests_tax' ) ); 91 91 92 $post_ID = $this->factory->post->create();92 $post_ID = self::$factory->post->create(); 93 93 wp_set_object_terms( $post_ID, $t, 'wptests_tax' ); 94 94 … … 109 109 110 110 register_taxonomy( 'wptests_tax', 'post' ); 111 $terms = $this->factory->term->create_many( 2, array( 'taxonomy' => 'wptests_tax' ) );111 $terms = self::$factory->term->create_many( 2, array( 'taxonomy' => 'wptests_tax' ) ); 112 112 113 113 $o = 12345; … … 130 130 131 131 register_taxonomy( 'wptests_tax', 'post' ); 132 $terms = $this->factory->term->create_many( 2, array( 'taxonomy' => 'wptests_tax' ) );132 $terms = self::$factory->term->create_many( 2, array( 'taxonomy' => 'wptests_tax' ) ); 133 133 134 134 $o = 12345;
Note: See TracChangeset
for help on using the changeset viewer.