WordPress.org

Make WordPress Core


Ignore:
Timestamp:
01/28/2020 12:51:42 AM (21 months ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Disable WPCS warnings for date_default_timezone_set() and current_time( 'timestamp' ) calls in Date/Time tests.

These calls are intentional and required for the tests.

See #49222.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/date/mysql2date.php

    r46586 r47118  
    88
    99    function tearDown() {
     10        // phpcs:ignore WordPress.DateTime.RestrictedFunctions.timezone_change_date_default_timezone_set
    1011        date_default_timezone_set( 'UTC' );
    1112
     
    3233    function test_mysql2date_should_format_time_with_changed_time_zone() {
    3334        $timezone = 'Europe/Kiev';
     35        // phpcs:ignore WordPress.DateTime.RestrictedFunctions.timezone_change_date_default_timezone_set
    3436        date_default_timezone_set( $timezone );
    3537        update_option( 'timezone_string', $timezone );
Note: See TracChangeset for help on using the changeset viewer.