- Timestamp:
- 09/02/2020 12:35:36 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/admin/includesCommunityEvents.php
r48576 r48937 165 165 $this->assertNotWPError( $response ); 166 166 $this->assertEqualSetsWithIndex( $this->get_user_location(), $response['location'] ); 167 $this->assert Equals( gmdate( 'l, M j, Y', strtotime( 'next Sunday 1pm' ) ), $response['events'][0]['formatted_date'] );168 $this->assert Equals( '1:00 pm', $response['events'][0]['formatted_time'] );167 $this->assertSame( gmdate( 'l, M j, Y', strtotime( 'next Sunday 1pm' ) ), $response['events'][0]['formatted_date'] ); 168 $this->assertSame( '1:00 pm', $response['events'][0]['formatted_time'] ); 169 169 170 170 remove_filter( 'pre_http_request', array( $this, '_http_request_valid_response' ) ); … … 186 186 $this->assertNotWPError( $cached_events ); 187 187 $this->assertEqualSetsWithIndex( $this->get_user_location(), $cached_events['location'] ); 188 $this->assert Equals( gmdate( 'l, M j, Y', strtotime( 'next Sunday 1pm' ) ), $cached_events['events'][0]['formatted_date'] );189 $this->assert Equals( '1:00 pm', $cached_events['events'][0]['formatted_time'] );188 $this->assertSame( gmdate( 'l, M j, Y', strtotime( 'next Sunday 1pm' ) ), $cached_events['events'][0]['formatted_date'] ); 189 $this->assertSame( '1:00 pm', $cached_events['events'][0]['formatted_time'] ); 190 190 191 191 remove_filter( 'pre_http_request', array( $this, '_http_request_valid_response' ) ); … … 274 274 */ 275 275 $this->assertCount( 3, $response_body['events'] ); 276 $this->assert Equals( $response_body['events'][0]['title'], 'Flexbox + CSS Grid: Magic for Responsive Layouts' );277 $this->assert Equals( $response_body['events'][1]['title'], 'Part 3- Site Maintenance - Tools to Make It Easy' );278 $this->assert Equals( $response_body['events'][2]['title'], 'WordCamp San Diego' );276 $this->assertSame( $response_body['events'][0]['title'], 'Flexbox + CSS Grid: Magic for Responsive Layouts' ); 277 $this->assertSame( $response_body['events'][1]['title'], 'Part 3- Site Maintenance - Tools to Make It Easy' ); 278 $this->assertSame( $response_body['events'][2]['title'], 'WordCamp San Diego' ); 279 279 280 280 remove_filter( 'pre_http_request', array( $this, '_http_request_valid_response_unpinned_wordcamp' ) ); … … 376 376 */ 377 377 $this->assertCount( 3, $response_body['events'] ); 378 $this->assert Equals( $response_body['events'][0]['title'], 'WordCamp San Diego' );379 $this->assert Equals( $response_body['events'][1]['title'], 'Part 3- Site Maintenance - Tools to Make It Easy' );380 $this->assert Equals( $response_body['events'][2]['title'], 'WordPress Q&A' );378 $this->assertSame( $response_body['events'][0]['title'], 'WordCamp San Diego' ); 379 $this->assertSame( $response_body['events'][1]['title'], 'Part 3- Site Maintenance - Tools to Make It Easy' ); 380 $this->assertSame( $response_body['events'][2]['title'], 'WordPress Q&A' ); 381 381 382 382 remove_filter( 'pre_http_request', array( $this, '_http_request_valid_response_multiple_wordcamps' ) ); … … 489 489 $actual_result = WP_Community_Events::get_unsafe_client_ip(); 490 490 491 $this->assert Equals( $expected_result, $actual_result );491 $this->assertSame( $expected_result, $actual_result ); 492 492 } 493 493
Note: See TracChangeset
for help on using the changeset viewer.