Make WordPress Core

Changeset 47321


Ignore:
Timestamp:
02/19/2020 05:13:08 AM (4 years 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.1 branch.
See #40364.

Location:
branches/5.1
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.1

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

    r47316 r47321  
    17551755
    17561756            $site = get_site( $site_id );
    1757             $this->assertSame( strtotime( $first_date ), strtotime( $site->registered ), 'The dates should be equal', 2 );
    1758             $this->assertSame( strtotime( $first_date ), strtotime( $site->last_updated ), 'The dates should be equal', 2 );
     1757            $this->assertEquals( strtotime( $first_date ), strtotime( $site->registered ), 'The dates should be equal', 2 );
     1758            $this->assertEquals( strtotime( $first_date ), strtotime( $site->last_updated ), 'The dates should be equal', 2 );
    17591759
    17601760            $second_date = current_time( 'mysql', true );
     
    17631763
    17641764            $site = get_site( $site_id );
    1765             $this->assertSame( strtotime( $first_date ), strtotime( $site->registered ), 'The dates should be equal', 2 );
    1766             $this->assertSame( strtotime( $second_date ), strtotime( $site->last_updated ), 'The dates should be equal', 2 );
     1765            $this->assertEquals( strtotime( $first_date ), strtotime( $site->registered ), 'The dates should be equal', 2 );
     1766            $this->assertEquals( strtotime( $second_date ), strtotime( $site->last_updated ), 'The dates should be equal', 2 );
    17671767        }
    17681768
Note: See TracChangeset for help on using the changeset viewer.