diff --git a/tests/phpunit/tests/category/wpListCategories.php b/tests/phpunit/tests/category/wpListCategories.php index 646128641c..55af2f484e 100644 --- a/tests/phpunit/tests/category/wpListCategories.php +++ b/tests/phpunit/tests/category/wpListCategories.php @@ -70,6 +70,36 @@ class Tests_Category_WpListCategories extends WP_UnitTestCase { $this->assertNotContains( 'Test Cat 1', $found ); } + public function test_show_option_all_link_should_go_to_home_page_when_show_on_front_is_false() { + $cats = $this->factory->category->create_many( 2 ); + + $found = wp_list_categories( array( + 'echo' => false, + 'show_option_all' => 'All', + 'hide_empty' => false, + 'taxonomy' => 'category', + ) ); + + $this->assertContains( "