Skip to content

Commit

Permalink
fix other affected integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wordpressfan committed Oct 24, 2024
1 parent 02a49b5 commit cb671c1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/Integration/ContentTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ protected function setUpCategory( $args = [] ) {
$category = $this->factory->category->create_and_get( $args );
$this->go_to( "/?cat={$category->term_id}" );

global $wp;
$wp->request = "/?cat={$category->term_id}";

$this->assertTrue( is_category() );

return $category;
Expand All @@ -71,6 +74,9 @@ protected function setUpTag( $args = [] ) {
$tag = $this->factory->term->create_and_get( $args );
$this->go_to( "/?tag={$tag->slug}" );

global $wp;
$wp->request = "/?tag={$tag->slug}";

$this->assertTrue( is_tag() );

return $tag;
Expand Down Expand Up @@ -99,6 +105,9 @@ protected function setUpTax( $taxonomy = 'wptests_tax', $object_type = 'post', a

$this->go_to( "/?{$taxonomy}={$term->slug}" );

global $wp;
$wp->request = "/?{$taxonomy}={$term->slug}";

$this->assertTrue( is_tax() );

return [
Expand Down

0 comments on commit cb671c1

Please sign in to comment.