From ca6794384c5236d7e7ee00f1992b0481b7cc2569 Mon Sep 17 00:00:00 2001 From: Bernie Reiter Date: Wed, 11 Sep 2024 16:50:31 +0200 Subject: [PATCH] Add more test coverage --- tests/phpunit/tests/canonical.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/phpunit/tests/canonical.php b/tests/phpunit/tests/canonical.php index 3876f6500dde2..b8937d78ddc0d 100644 --- a/tests/phpunit/tests/canonical.php +++ b/tests/phpunit/tests/canonical.php @@ -157,6 +157,17 @@ public function data_canonical() { ), // Categories & intersections with other vars. + array( + '/category/?tag=post-formats', + array( + 'url' => '/category/?tag=post-formats', + 'qv' => array( + 'category_name' => '', + 'tag' => 'post-formats', + ), + ), + 61957, + ), array( '/category/uncategorized/?tag=post-formats', array( @@ -176,6 +187,7 @@ public function data_canonical() { ), // Taxonomies with extra query vars. + array( '/category/page/1/?test=one%20two', '/category/?test=one%20two', 61957 ), // Extra query vars should stay encoded. array( '/category/cat-a/page/1/?test=one%20two', '/category/cat-a/?test=one%20two', 18086 ), // Extra query vars should stay encoded. // Categories with dates.