From cb671c16edd072a877c13e1d0bca97986fa673c3 Mon Sep 17 00:00:00 2001 From: WordPressFan Date: Thu, 24 Oct 2024 10:10:09 +0300 Subject: [PATCH] fix other affected integration tests --- tests/Integration/ContentTrait.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/Integration/ContentTrait.php b/tests/Integration/ContentTrait.php index f24618ed43..266f5b0a7d 100644 --- a/tests/Integration/ContentTrait.php +++ b/tests/Integration/ContentTrait.php @@ -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; @@ -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; @@ -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 [