You appear to be a bot. Output may be restricted
Description
Only registered locations should be mapped and returned.
Usage
Tests_Nav_Menu_Theme_Change::test_filter_registered_locations();
Parameters
Returns
void
Source
File name: wordpress-develop-tests/phpunit/tests/menu/nav-menu.php
Lines:
1 to 17 of 17
public function test_filter_registered_locations() { $this->register_nav_menu_locations( array( 'primary', 'secondary' ) ); $prev_theme_nav_menu_locations = array( 'primary' => 1, 'secondary' => 2, 'social' => 3, ); $old_next_theme_nav_menu_locations = $prev_theme_nav_menu_locations; $new_next_theme_nav_menu_locations = wp_map_nav_menu_locations( $old_next_theme_nav_menu_locations, $prev_theme_nav_menu_locations ); $expected_nav_menu_locations = array( 'primary' => 1, 'secondary' => 2, ); $this->assertSame( $expected_nav_menu_locations, $new_next_theme_nav_menu_locations ); }