Changeset 35196
- Timestamp:
- 10/15/2015 06:52:19 AM (9 years ago)
- Location:
- trunk/tests/phpunit/tests
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/query/conditionals.php
r35162 r35196 333 333 $types = array('feed', 'rdf', 'rss', 'rss2', 'atom'); 334 334 foreach ($types as $type) { 335 336 335 $this->go_to("/category/cat-a/feed/{$type}"); 336 $this->assertQueryTrue('is_archive', 'is_feed', 'is_category'); 337 337 } 338 338 … … 340 340 $types = array('feed', 'rdf', 'rss', 'rss2', 'atom'); 341 341 foreach ($types as $type) { 342 343 342 $this->go_to("/category/cat-a/{$type}"); 343 $this->assertQueryTrue('is_archive', 'is_feed', 'is_category'); 344 344 } 345 345 } -
trunk/tests/phpunit/tests/term/getTerms.php
r35117 r35196 287 287 288 288 $brie = $this->factory->term->create( array( 'name' => 'Brie', 'parent' => $cheese, 'taxonomy' => $tax ) ); 289 $post_ids = $this->factory->post->create_many( 7 ); 290 foreach ( $post_ids as $id ) { 291 wp_set_post_terms( $id, $brie, $tax ); 292 } 289 $post_id = $this->factory->post->create(); 290 wp_set_post_terms( $post_id, $brie, $tax ); 293 291 $term = get_term( $brie, $tax ); 294 $this->assertEquals( 7, $term->count );292 $this->assertEquals( 1, $term->count ); 295 293 296 294 $crackers = $this->factory->term->create( array( 'name' => 'Crackers', 'taxonomy' => $tax ) ); … … 305 303 306 304 $multigrain = $this->factory->term->create( array( 'name' => 'Multigrain', 'parent' => $crackers, 'taxonomy' => $tax ) ); 307 $post_ids = $this->factory->post->create_many( 3);305 $post_ids = $this->factory->post->create_many( 1 ); 308 306 foreach ( $post_ids as $id ) { 309 307 wp_set_post_terms( $id, $multigrain, $tax ); 310 308 } 311 309 $term = get_term( $multigrain, $tax ); 312 $this->assertEquals( 3, $term->count );310 $this->assertEquals( 1, $term->count ); 313 311 314 312 $fruit = $this->factory->term->create( array( 'name' => 'Fruit', 'taxonomy' => $tax ) );
Note: See TracChangeset
for help on using the changeset viewer.