You appear to be a bot. Output may be restricted
Description
Locations with the same name should map, switching to a theme not previously-active.
Usage
Tests_Nav_Menu_Theme_Change::test_locations_with_same_slug();
Parameters
Returns
void
Source
File name: wordpress-develop-tests/phpunit/tests/menu/nav-menu.php
Lines:
1 to 14 of 14
public function test_locations_with_same_slug() { $this->register_nav_menu_locations( array( 'primary', 'secondary' ) ); $prev_theme_nav_menu_locations = array( 'primary' => 1, 'secondary' => 2, ); $old_next_theme_nav_menu_locations = array(); // It was not active before. $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 = $prev_theme_nav_menu_locations; $this->assertSame( $expected_nav_menu_locations, $new_next_theme_nav_menu_locations ); }