- Timestamp:
- 09/07/2020 03:12:17 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/rest-posts-controller.php
r48939 r48952 4640 4640 $body = $response->get_data(); 4641 4641 4642 $this->assertEquals ( strtotime( $get_body['date'] ), strtotime( $body['date'] ), 'The dates should be equal', 2);4643 $this->assertEquals ( strtotime( $get_body['date_gmt'] ), strtotime( $body['date_gmt'] ), 'The dates should be equal', 2);4642 $this->assertEqualsWithDelta( strtotime( $get_body['date'] ), strtotime( $body['date'] ), 2, 'The dates should be equal' ); 4643 $this->assertEqualsWithDelta( strtotime( $get_body['date_gmt'] ), strtotime( $body['date_gmt'] ), 2, 'The dates should be equal' ); 4644 4644 4645 4645 $this->assertSame( '0000-00-00 00:00:00', get_post( $post->ID )->post_date_gmt ); … … 4683 4683 $body = $response->get_data(); 4684 4684 4685 $this->assertEquals ( strtotime( mysql_to_rfc3339( $new_time ) ), strtotime( $body['date'] ), 'The dates should be equal', 2);4685 $this->assertEqualsWithDelta( strtotime( mysql_to_rfc3339( $new_time ) ), strtotime( $body['date'] ), 2, 'The dates should be equal' ); 4686 4686 4687 4687 $this->assertNotEquals( '0000-00-00 00:00:00', get_post( $post->ID )->post_date_gmt ); … … 4724 4724 $body = $response->get_data(); 4725 4725 4726 $this->assertEquals ( strtotime( $get_body['date'] ), strtotime( $body['date'] ), 'The dates should be equal', 2);4727 $this->assertEquals ( strtotime( $get_body['date_gmt'] ), strtotime( $body['date_gmt'] ), 'The dates should be equal', 2);4726 $this->assertEqualsWithDelta( strtotime( $get_body['date'] ), strtotime( $body['date'] ), 2, 'The dates should be equal' ); 4727 $this->assertEqualsWithDelta( strtotime( $get_body['date_gmt'] ), strtotime( $body['date_gmt'] ), 2, 'The dates should be equal' ); 4728 4728 4729 4729 $this->assertNotEquals( '0000-00-00 00:00:00', get_post( $post->ID )->post_date_gmt );
Note: See TracChangeset
for help on using the changeset viewer.