Changeset 48937 for trunk/tests/phpunit/tests/formatting/date.php
- Timestamp:
- 09/02/2020 12:35:36 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/formatting/date.php
r46586 r48937 16 16 $local = '2012-01-01 12:34:56'; 17 17 $gmt = $local; 18 $this->assert Equals( $local, get_date_from_gmt( $gmt ) );18 $this->assertSame( $local, get_date_from_gmt( $gmt ) ); 19 19 } 20 20 … … 28 28 $gmt = '2012-06-01 12:34:56'; 29 29 $local = '2012-06-01 13:34:56'; 30 $this->assert Equals( $local, get_date_from_gmt( $gmt ) );30 $this->assertSame( $local, get_date_from_gmt( $gmt ) ); 31 31 } 32 32 … … 38 38 $local = '2012-01-01 12:34:56'; 39 39 $gmt = $local; 40 $this->assert Equals( $gmt, get_gmt_from_date( $local ) );40 $this->assertSame( $gmt, get_gmt_from_date( $local ) ); 41 41 } 42 42 … … 48 48 $local = '2012-06-01 12:34:56'; 49 49 $gmt = '2012-06-01 11:34:56'; 50 $this->assert Equals( $gmt, get_gmt_from_date( $local ) );50 $this->assertSame( $gmt, get_gmt_from_date( $local ) ); 51 51 } 52 52 … … 57 57 $local = '2012-01-01 12:34:56'; 58 58 $gmt = $local; 59 $this->assert Equals( $gmt, get_date_from_gmt( $local ) );59 $this->assertSame( $gmt, get_date_from_gmt( $local ) ); 60 60 } 61 61 … … 66 66 $gmt = '2012-12-01 00:00:00'; 67 67 $date = '2012-12-01'; 68 $this->assert Equals( $gmt, get_gmt_from_date( $date ) );68 $this->assertSame( $gmt, get_gmt_from_date( $date ) ); 69 69 } 70 70 … … 76 76 $local = '2012-12-01'; 77 77 $gmt = '2012-12-01 00:00:00'; 78 $this->assert Equals( $gmt, get_gmt_from_date( $local ) );78 $this->assertSame( $gmt, get_gmt_from_date( $local ) ); 79 79 } 80 80 … … 111 111 $mysql_local = $local->format( 'Y-m-d H:i:s' ); 112 112 113 $this->assert Equals( $utc->format( DATE_RFC3339 ), get_gmt_from_date( $mysql_local, DATE_RFC3339 ) );113 $this->assertSame( $utc->format( DATE_RFC3339 ), get_gmt_from_date( $mysql_local, DATE_RFC3339 ) ); 114 114 } 115 115 … … 127 127 $mysql_utc = $utc->format( 'Y-m-d H:i:s' ); 128 128 129 $this->assert Equals( $local->format( DATE_RFC3339 ), get_date_from_gmt( $mysql_utc, DATE_RFC3339 ) );129 $this->assertSame( $local->format( DATE_RFC3339 ), get_date_from_gmt( $mysql_utc, DATE_RFC3339 ) ); 130 130 } 131 131 … … 145 145 $utc = $local->setTimezone( new DateTimeZone( 'UTC' ) ); 146 146 147 $this->assert Equals(147 $this->assertSame( 148 148 $local->format( 'Y-m-d H:i:s' ), 149 149 iso8601_to_datetime( $local->format( $format ) ), 150 150 'Local time from local time.' 151 151 ); 152 $this->assert Equals(152 $this->assertSame( 153 153 $utc->format( 'Y-m-d H:i:s' ), 154 154 iso8601_to_datetime( $local->format( $format ), 'gmt' ), … … 156 156 ); 157 157 158 $this->assert Equals(158 $this->assertSame( 159 159 $local->format( 'Y-m-d H:i:s' ), 160 160 iso8601_to_datetime( $local->format( $format_no_tz ) ), 161 161 'Local time from local time w/o timezone.' 162 162 ); 163 $this->assert Equals(163 $this->assertSame( 164 164 $utc->format( 'Y-m-d H:i:s' ), 165 165 iso8601_to_datetime( $local->format( $format_no_tz ), 'gmt' ), … … 167 167 ); 168 168 169 $this->assert Equals(169 $this->assertSame( 170 170 $local->format( 'Y-m-d H:i:s' ), 171 171 iso8601_to_datetime( $utc->format( $format ) ), 172 172 'Local time from UTC time.' 173 173 ); 174 $this->assert Equals(174 $this->assertSame( 175 175 $utc->format( 'Y-m-d H:i:s' ), 176 176 iso8601_to_datetime( $utc->format( $format ), 'gmt' ), … … 178 178 ); 179 179 180 $this->assert Equals(180 $this->assertSame( 181 181 $local->format( 'Y-m-d H:i:s' ), 182 182 iso8601_to_datetime( $utc->format( $format_no_tz ) . 'Z' ), 183 183 'Local time from UTC w/ Z timezone.' 184 184 ); 185 $this->assert Equals(185 $this->assertSame( 186 186 $utc->format( 'Y-m-d H:i:s' ), 187 187 iso8601_to_datetime( $utc->format( $format_no_tz ) . 'Z', 'gmt' ),
Note: See TracChangeset
for help on using the changeset viewer.