Make WordPress Core


Ignore:
Timestamp:
11/30/2017 11:09:33 PM (8 years ago)
Author:
pento
Message:

Code is Poetry.
WordPress' code just... wasn't.
This is now dealt with.

Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS.
Fixes #41057.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/menu/nav-menu.php

    r42026 r42343  
    3636    function test_one_location_each() {
    3737        $this->register_nav_menu_locations( array( 'primary' ) );
    38         $prev_theme_nav_menu_locations = array(
     38        $prev_theme_nav_menu_locations     = array(
    3939            'unique-slug' => 1,
    4040        );
     
    5656        $this->register_nav_menu_locations( array( 'primary', 'secondary' ) );
    5757        $old_next_theme_nav_menu_locations = $prev_theme_nav_menu_locations = array(
    58             'primary' => 1,
    59             'secondary' => 2,
    60             'social' => 3,
    61         );
    62         $new_next_theme_nav_menu_locations = wp_map_nav_menu_locations( $old_next_theme_nav_menu_locations, $prev_theme_nav_menu_locations );
    63 
    64         $expected_nav_menu_locations = array(
    65             'primary' => 1,
     58            'primary'   => 1,
     59            'secondary' => 2,
     60            'social'    => 3,
     61        );
     62        $new_next_theme_nav_menu_locations = wp_map_nav_menu_locations( $old_next_theme_nav_menu_locations, $prev_theme_nav_menu_locations );
     63
     64        $expected_nav_menu_locations = array(
     65            'primary'   => 1,
    6666            'secondary' => 2,
    6767        );
     
    7777        $this->register_nav_menu_locations( array( 'primary', 'secondary' ) );
    7878        $prev_theme_nav_menu_locations = array(
    79             'primary' => 1,
     79            'primary'   => 1,
    8080            'secondary' => 2,
    8181        );
     
    9797
    9898        $prev_theme_nav_menu_locations = array(
    99             'primary' => 1,
     99            'primary'   => 1,
    100100            'secondary' => 2,
    101101        );
     
    129129
    130130        $expected_nav_menu_locations = array(
    131             'primary' => 1,
     131            'primary'   => 1,
    132132            'secondary' => 2,
    133133        );
     
    143143        $this->register_nav_menu_locations( array( 'primary' ) );
    144144        $prev_theme_nav_menu_locations = array(
    145             'top-menu' => 1,
     145            'top-menu'  => 1,
    146146            'secondary' => 2,
    147147        );
     
    166166        $prev_theme_nav_menu_locations = array(
    167167            'navigation-menu' => 1,
    168             'top-menu' => 2,
     168            'top-menu'        => 2,
    169169        );
    170170
     
    174174        $expected_nav_menu_locations = array(
    175175            'primary' => 1,
    176             'main' => 2,
     176            'main'    => 2,
    177177        );
    178178        $this->assertEquals( $expected_nav_menu_locations, $new_next_theme_nav_menu_locations );
     
    188188
    189189        $prev_theme_nav_menu_locations = array(
    190             'main' => 1,
    191             'secondary' => 2,
    192             'tertiary' => 3,
     190            'main'      => 1,
     191            'secondary' => 2,
     192            'tertiary'  => 3,
    193193        );
    194194
Note: See TracChangeset for help on using the changeset viewer.