WordPress.org

Make WordPress Core

Changeset 47320


Ignore:
Timestamp:
02/19/2020 05:12:43 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.2 branch.
See #40364.

Location:
branches/5.2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.2

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

    r47315 r47320  
    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.