WordPress.org

Make WordPress Core

Changeset 48333


Ignore:
Timestamp:
07/06/2020 09:49:07 AM (17 months ago)
Author:
SergeyBiryukov
Message:

Tests: Correct hardcoded "3 months ago" assertion in tests/rest-api/rest-block-directory-controller.php.

Now that more than 3 months have passed since 2020-03-23, this was causing test failures.

Follow-up to [48242].

See #50321.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/rest-api/rest-block-directory-controller.php

    r48242 r48333  
    169169                'https://ps.w.org/guidepost/tags/1.2.1/build/guidepost-theme.js?v=1584940380',
    170170            ),
    171             'last_updated'        => '2020-03-23T05:13:00',
    172             'humanized_updated'   => '3 months ago',
     171            'last_updated'        => gmdate( 'Y-m-d\TH:i:s', strtotime( $plugin['last_updated'] ) ),
     172            'humanized_updated'   => sprintf( '%s ago', human_time_diff( strtotime( $plugin['last_updated'] ) ) ),
    173173        );
    174174
Note: See TracChangeset for help on using the changeset viewer.