Make WordPress Core

Changeset 35196


Ignore:
Timestamp:
10/15/2015 06:52:19 AM (11 years ago)
Author:
wonderboymusic
Message:

Unit Tests: create fewer terms in Tests_Term_getTerms::test_get_terms_parent_zero()

See #30017, #33968.

Location:
trunk/tests/phpunit/tests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/query/conditionals.php

    r35162 r35196  
    333333                $types = array('feed', 'rdf', 'rss', 'rss2', 'atom');
    334334                foreach ($types as $type) {
    335                                 $this->go_to("/category/cat-a/feed/{$type}");
    336                                 $this->assertQueryTrue('is_archive', 'is_feed', 'is_category');
     335                        $this->go_to("/category/cat-a/feed/{$type}");
     336                        $this->assertQueryTrue('is_archive', 'is_feed', 'is_category');
    337337                }
    338338
     
    340340                $types = array('feed', 'rdf', 'rss', 'rss2', 'atom');
    341341                foreach ($types as $type) {
    342                                 $this->go_to("/category/cat-a/{$type}");
    343                                 $this->assertQueryTrue('is_archive', 'is_feed', 'is_category');
     342                        $this->go_to("/category/cat-a/{$type}");
     343                        $this->assertQueryTrue('is_archive', 'is_feed', 'is_category');
    344344                }
    345345        }
  • trunk/tests/phpunit/tests/term/getTerms.php

    r35117 r35196  
    287287
    288288                $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 );
    293291                $term = get_term( $brie, $tax );
    294                 $this->assertEquals( 7, $term->count );
     292                $this->assertEquals( 1, $term->count );
    295293
    296294                $crackers = $this->factory->term->create( array( 'name' => 'Crackers', 'taxonomy' => $tax ) );
     
    305303
    306304                $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 );
    308306                foreach ( $post_ids as $id ) {
    309307                        wp_set_post_terms( $id, $multigrain, $tax );
    310308                }
    311309                $term = get_term( $multigrain, $tax );
    312                 $this->assertEquals( 3, $term->count );
     310                $this->assertEquals( 1, $term->count );
    313311
    314312                $fruit = $this->factory->term->create( array( 'name' => 'Fruit', 'taxonomy' => $tax ) );
Note: See TracChangeset for help on using the changeset viewer.