WordPress.org

Make WordPress Core

Changeset 50014


Ignore:
Timestamp:
01/25/2021 06:53:43 AM (3 months ago)
Author:
pento
Message:

Menus: Fix linting errors introduced in [50013].

Props TimothyBlynJacobs.
Fixes #52189.

File:
1 edited

Legend:

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

    r50013 r50014  
    10231023            )
    10241024        );
    1025         $post = get_post( $menu_item_id );
    1026         $this->assertEqualsWithDelta( strtotime( date( 'Y-m-d H:i:s' ) ), strtotime( $post->post_date ), 2, 'The dates should be equal' );
     1025        $post         = get_post( $menu_item_id );
     1026        $this->assertEqualsWithDelta( strtotime( gmdate( 'Y-m-d H:i:s' ) ), strtotime( $post->post_date ), 2, 'The dates should be equal' );
    10271027
    10281028        $menu_item_id = wp_update_nav_menu_item(
     
    10371037            )
    10381038        );
    1039         $post = get_post( $menu_item_id );
     1039        $post         = get_post( $menu_item_id );
    10401040        $this->assertEquals( get_date_from_gmt( $post_date_gmt ), $post->post_date );
    10411041
     
    10511051            )
    10521052        );
    1053         $post = get_post( $menu_item_id );
     1053        $post         = get_post( $menu_item_id );
    10541054        $this->assertEquals( '1970-01-01 00:00:00', $post->post_date );
    10551055
     
    10651065            )
    10661066        );
    1067         $post = get_post( $menu_item_id );
     1067        $post         = get_post( $menu_item_id );
    10681068        $this->assertEquals( $post_date, $post->post_date );
    10691069
     
    10801080            )
    10811081        );
    1082         $post = get_post( $menu_item_id );
     1082        $post         = get_post( $menu_item_id );
    10831083        $this->assertEquals( $post_date, $post->post_date );
    10841084
     
    10951095            )
    10961096        );
    1097         $post = get_post( $menu_item_id );
     1097        $post         = get_post( $menu_item_id );
    10981098        $this->assertEquals( $post_date, $post->post_date );
    10991099
     
    11091109            )
    11101110        );
    1111         $post = get_post( $menu_item_id );
    1112         $this->assertEqualsWithDelta( strtotime( date( 'Y-m-d H:i:s' ) ), strtotime( $post->post_date ), 2, 'The dates should be equal' );
     1111        $post         = get_post( $menu_item_id );
     1112        $this->assertEqualsWithDelta( strtotime( gmdate( 'Y-m-d H:i:s' ) ), strtotime( $post->post_date ), 2, 'The dates should be equal' );
    11131113
    11141114        $menu_item_id = wp_update_nav_menu_item(
     
    11241124            )
    11251125        );
    1126         $post = get_post( $menu_item_id );
    1127         $this->assertEqualsWithDelta( strtotime( date( 'Y-m-d H:i:s' ) ), strtotime( $post->post_date ), 2, 'The dates should be equal' );
     1126        $post         = get_post( $menu_item_id );
     1127        $this->assertEqualsWithDelta( strtotime( gmdate( 'Y-m-d H:i:s' ) ), strtotime( $post->post_date ), 2, 'The dates should be equal' );
    11281128
    11291129        $menu_item_id = wp_update_nav_menu_item(
     
    11391139            )
    11401140        );
    1141         $post = get_post( $menu_item_id );
    1142         $this->assertEqualsWithDelta( strtotime( date( 'Y-m-d H:i:s' ) ), strtotime( $post->post_date ), 2, 'The dates should be equal' );
     1141        $post         = get_post( $menu_item_id );
     1142        $this->assertEqualsWithDelta( strtotime( gmdate( 'Y-m-d H:i:s' ) ), strtotime( $post->post_date ), 2, 'The dates should be equal' );
    11431143    }
    11441144}
Note: See TracChangeset for help on using the changeset viewer.