Changeset 35242 for trunk/tests/phpunit/tests/term/query.php
- Timestamp:
- 10/17/2015 06:02:16 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/term/query.php
r35225 r35242 126 126 127 127 public function test_transform_query_resulting_field_sanitized() { 128 $t1 = self:: $factory->category->create( array( 'slug' => 'foo', ) );129 $t2 = self:: $factory->category->create( array( 'slug' => 'bar', ) );130 $p = self:: $factory->post->create();128 $t1 = self::factory()->category->create( array( 'slug' => 'foo', ) ); 129 $t2 = self::factory()->category->create( array( 'slug' => 'bar', ) ); 130 $p = self::factory()->post->create(); 131 131 wp_set_post_categories( $p, $t1 ); 132 132 … … 151 151 152 152 public function test_transform_query_field_slug() { 153 $t1 = self:: $factory->category->create( array( 'slug' => 'foo', ) );154 $p = self:: $factory->post->create();153 $t1 = self::factory()->category->create( array( 'slug' => 'foo', ) ); 154 $p = self::factory()->post->create(); 155 155 $tt_ids = wp_set_post_categories( $p, $t1 ); 156 156 … … 169 169 170 170 public function test_transform_query_field_name() { 171 $t1 = self:: $factory->category->create( array( 'slug' => 'foo', 'name' => 'Foo', ) );172 $p = self:: $factory->post->create();171 $t1 = self::factory()->category->create( array( 'slug' => 'foo', 'name' => 'Foo', ) ); 172 $p = self::factory()->post->create(); 173 173 $tt_ids = wp_set_post_categories( $p, $t1 ); 174 174 … … 187 187 188 188 public function test_transform_query_field_term_taxonomy_id() { 189 $t1 = self:: $factory->category->create( array( 'slug' => 'foo', 'name' => 'Foo', ) );190 $p = self:: $factory->post->create();189 $t1 = self::factory()->category->create( array( 'slug' => 'foo', 'name' => 'Foo', ) ); 190 $p = self::factory()->post->create(); 191 191 $tt_ids = wp_set_post_categories( $p, $t1 ); 192 192 … … 205 205 206 206 public function test_transform_query_field_term_taxonomy_default() { 207 $t1 = self:: $factory->category->create( array( 'slug' => 'foo', 'name' => 'Foo', ) );208 $p = self:: $factory->post->create();207 $t1 = self::factory()->category->create( array( 'slug' => 'foo', 'name' => 'Foo', ) ); 208 $p = self::factory()->post->create(); 209 209 $tt_ids = wp_set_post_categories( $p, $t1 ); 210 210 … … 241 241 register_taxonomy( 'wptests_tax', 'post' ); 242 242 243 $t1 = self:: $factory->term->create( array(244 'taxonomy' => 'wptests_tax', 245 ) ); 246 $t2 = self:: $factory->term->create( array(247 'taxonomy' => 'wptests_tax', 248 ) ); 249 $t3 = self:: $factory->term->create( array(243 $t1 = self::factory()->term->create( array( 244 'taxonomy' => 'wptests_tax', 245 ) ); 246 $t2 = self::factory()->term->create( array( 247 'taxonomy' => 'wptests_tax', 248 ) ); 249 $t3 = self::factory()->term->create( array( 250 250 'taxonomy' => 'wptests_tax', 251 251 ) ); … … 285 285 register_taxonomy( 'wptests_tax', 'post' ); 286 286 287 $t1 = self:: $factory->term->create( array(288 'taxonomy' => 'wptests_tax', 289 ) ); 290 $t2 = self:: $factory->term->create( array(291 'taxonomy' => 'wptests_tax', 292 ) ); 293 $t3 = self:: $factory->term->create( array(287 $t1 = self::factory()->term->create( array( 288 'taxonomy' => 'wptests_tax', 289 ) ); 290 $t2 = self::factory()->term->create( array( 291 'taxonomy' => 'wptests_tax', 292 ) ); 293 $t3 = self::factory()->term->create( array( 294 294 'taxonomy' => 'wptests_tax', 295 295 ) ); … … 328 328 register_taxonomy( 'wptests_tax', 'post' ); 329 329 330 $t1 = self:: $factory->term->create( array(331 'taxonomy' => 'wptests_tax', 332 ) ); 333 $t2 = self:: $factory->term->create( array(334 'taxonomy' => 'wptests_tax', 335 ) ); 336 $t3 = self:: $factory->term->create( array(330 $t1 = self::factory()->term->create( array( 331 'taxonomy' => 'wptests_tax', 332 ) ); 333 $t2 = self::factory()->term->create( array( 334 'taxonomy' => 'wptests_tax', 335 ) ); 336 $t3 = self::factory()->term->create( array( 337 337 'taxonomy' => 'wptests_tax', 338 338 ) );
Note: See TracChangeset
for help on using the changeset viewer.