WordPress.org

Make WordPress Core

Changeset 47319


Ignore:
Timestamp:
02/19/2020 05:12:22 AM (7 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].

Merges [47318] to the 5.3 branch.
See #40364.

Location:
branches/5.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.3

  • branches/5.3/tests/phpunit/tests/multisite/site.php

    r47314 r47319  
    17691769
    17701770            $site = get_site( $site_id );
    1771             $this->assertSame( strtotime( $first_date ), strtotime( $site->registered ), 'The dates should be equal', 2 );
    1772             $this->assertSame( strtotime( $first_date ), strtotime( $site->last_updated ), 'The dates should be equal', 2 );
     1771            $this->assertEquals( strtotime( $first_date ), strtotime( $site->registered ), 'The dates should be equal', 2 );
     1772            $this->assertEquals( strtotime( $first_date ), strtotime( $site->last_updated ), 'The dates should be equal', 2 );
    17731773
    17741774            $second_date = current_time( 'mysql', true );
     
    17771777
    17781778            $site = get_site( $site_id );
    1779             $this->assertSame( strtotime( $first_date ), strtotime( $site->registered ), 'The dates should be equal', 2 );
    1780             $this->assertSame( strtotime( $second_date ), strtotime( $site->last_updated ), 'The dates should be equal', 2 );
     1779            $this->assertEquals( strtotime( $first_date ), strtotime( $site->registered ), 'The dates should be equal', 2 );
     1780            $this->assertEquals( strtotime( $second_date ), strtotime( $site->last_updated ), 'The dates should be equal', 2 );
    17811781        }
    17821782
Note: See TracChangeset for help on using the changeset viewer.