diff --git a/tests/phpunit/tests/query/conditionals.php b/tests/phpunit/tests/query/conditionals.php index 6eeb571e6c..5814428b1e 100644 --- a/tests/phpunit/tests/query/conditionals.php +++ b/tests/phpunit/tests/query/conditionals.php @@ -332,15 +332,15 @@ class Tests_Query_Conditionals extends WP_UnitTestCase { // check the long form $types = array('feed', 'rdf', 'rss', 'rss2', 'atom'); foreach ($types as $type) { - $this->go_to("/category/cat-a/feed/{$type}"); - $this->assertQueryTrue('is_archive', 'is_feed', 'is_category'); + $this->go_to("/category/cat-a/feed/{$type}"); + $this->assertQueryTrue('is_archive', 'is_feed', 'is_category'); } // check the short form $types = array('feed', 'rdf', 'rss', 'rss2', 'atom'); foreach ($types as $type) { - $this->go_to("/category/cat-a/{$type}"); - $this->assertQueryTrue('is_archive', 'is_feed', 'is_category'); + $this->go_to("/category/cat-a/{$type}"); + $this->assertQueryTrue('is_archive', 'is_feed', 'is_category'); } } diff --git a/tests/phpunit/tests/term/getTerms.php b/tests/phpunit/tests/term/getTerms.php index 0b7ae77e9b..52ca4453cf 100644 --- a/tests/phpunit/tests/term/getTerms.php +++ b/tests/phpunit/tests/term/getTerms.php @@ -286,12 +286,10 @@ class Tests_Term_getTerms extends WP_UnitTestCase { $this->assertEquals( 2, $term->count ); $brie = $this->factory->term->create( array( 'name' => 'Brie', 'parent' => $cheese, 'taxonomy' => $tax ) ); - $post_ids = $this->factory->post->create_many( 7 ); - foreach ( $post_ids as $id ) { - wp_set_post_terms( $id, $brie, $tax ); - } + $post_id = $this->factory->post->create(); + wp_set_post_terms( $post_id, $brie, $tax ); $term = get_term( $brie, $tax ); - $this->assertEquals( 7, $term->count ); + $this->assertEquals( 1, $term->count ); $crackers = $this->factory->term->create( array( 'name' => 'Crackers', 'taxonomy' => $tax ) ); @@ -304,12 +302,12 @@ class Tests_Term_getTerms extends WP_UnitTestCase { $this->assertEquals( 1, $term->count ); $multigrain = $this->factory->term->create( array( 'name' => 'Multigrain', 'parent' => $crackers, 'taxonomy' => $tax ) ); - $post_ids = $this->factory->post->create_many( 3 ); + $post_ids = $this->factory->post->create_many( 1 ); foreach ( $post_ids as $id ) { wp_set_post_terms( $id, $multigrain, $tax ); } $term = get_term( $multigrain, $tax ); - $this->assertEquals( 3, $term->count ); + $this->assertEquals( 1, $term->count ); $fruit = $this->factory->term->create( array( 'name' => 'Fruit', 'taxonomy' => $tax ) ); $cranberries = $this->factory->term->create( array( 'name' => 'Cranberries', 'parent' => $fruit, 'taxonomy' => $tax ) );