WordPress.org

Make WordPress Core

Changeset 47318


Ignore:
Timestamp:
02/19/2020 04:38:39 AM (5 months ago)
Author:
SergeyBiryukov
Message:

Tests: Correct assertions in test_site_dates_are_gmt().

assertSame() doesn't have the $delta parameter, only assertEquals() does.

Follow-up to [47313].

See #40364.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/multisite/site.php

    r47313 r47318  
    17671767
    17681768            $site = get_site( $site_id );
    1769             $this->assertSame( strtotime( $first_date ), strtotime( $site->registered ), 'The dates should be equal', 2 );
    1770             $this->assertSame( strtotime( $first_date ), strtotime( $site->last_updated ), 'The dates should be equal', 2 );
     1769            $this->assertEquals( strtotime( $first_date ), strtotime( $site->registered ), 'The dates should be equal', 2 );
     1770            $this->assertEquals( strtotime( $first_date ), strtotime( $site->last_updated ), 'The dates should be equal', 2 );
    17711771
    17721772            $second_date = current_time( 'mysql', true );
     
    17751775
    17761776            $site = get_site( $site_id );
    1777             $this->assertSame( strtotime( $first_date ), strtotime( $site->registered ), 'The dates should be equal', 2 );
    1778             $this->assertSame( strtotime( $second_date ), strtotime( $site->last_updated ), 'The dates should be equal', 2 );
     1777            $this->assertEquals( strtotime( $first_date ), strtotime( $site->registered ), 'The dates should be equal', 2 );
     1778            $this->assertEquals( strtotime( $second_date ), strtotime( $site->last_updated ), 'The dates should be equal', 2 );
    17791779        }
    17801780
Note: See TracChangeset for help on using the changeset viewer.