diff --git a/tests/phpunit/tests/menu/wp-nav-menu.php b/tests/phpunit/tests/menu/wp-nav-menu.php index ac7c815b89..60a523bfd1 100644 --- a/tests/phpunit/tests/menu/wp-nav-menu.php +++ b/tests/phpunit/tests/menu/wp-nav-menu.php @@ -53,12 +53,13 @@ class Tests_Menu_wpNavMenu extends WP_UnitTestCase { ) ); - /** - * This filter is used to prevent reusing a menu item ID more that once. It cause the tests to failed - * after the first one since the IDs are missing from the HTML generated by `wp_nav_menu`. + /* + * This filter is used to prevent reusing a menu item ID more that once. + * It caused the tests to fail after the first one since the IDs are missing + * from the HTML generated by `wp_nav_menu()`. * - * To allow the tests to pass, we remove the filter before running them and add it back after - * they ran ({@see Tests_Menu_wpNavMenu::tear_down_after_class()}). + * To allow the tests to pass, we remove the filter before running them + * and add it back after they ran ({@see Tests_Menu_wpNavMenu::tear_down_after_class()}). */ remove_filter( 'nav_menu_item_id', '_nav_menu_item_id_use_once' ); } @@ -66,8 +67,9 @@ class Tests_Menu_wpNavMenu extends WP_UnitTestCase { public static function tear_down_after_class() { wp_delete_nav_menu( self::$menu_id ); - /** - * This filter was removed to let the tests pass and need to be added back ({@see Tests_Menu_wpNavMenu::set_up_before_class}). + /* + * This filter was removed to let the tests pass and needs to be added back + * ({@see Tests_Menu_wpNavMenu::set_up_before_class}). */ add_filter( 'nav_menu_item_id', '_nav_menu_item_id_use_once', 10, 2 ); @@ -75,8 +77,8 @@ class Tests_Menu_wpNavMenu extends WP_UnitTestCase { } /** - * Test all menu items containing children have the CSS class `menu-item-has-children` when displaying the menu - * without specifying a custom depth. + * Tests that all menu items containing children have the CSS class `menu-item-has-children` + * when displaying the menu without specifying a custom depth. * * @ticket 28620 */ @@ -90,35 +92,31 @@ class Tests_Menu_wpNavMenu extends WP_UnitTestCase { ) ); - // Level 0 should be present in the HTML output and have the `menu-item-has-children` class. $this->assertStringContainsString( sprintf( '