Changeset 45911 for trunk/tests/phpunit/tests/xmlrpc/wp/newPost.php
- Timestamp:
- 08/29/2019 04:43:28 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/xmlrpc/wp/newPost.php
r42343 r45911 356 356 $fetched_post = get_post( $result ); 357 357 $this->assertStringMatchesFormat( '%d', $result ); 358 $this->assertEquals( '1970-01-01 00:00:00', $fetched_post->post_date);358 $this->assertEquals( current_time( 'Y-m-d' ), substr( $fetched_post->post_date, 0, 10 ) ); 359 359 } 360 360 … … 364 364 function test_invalid_post_date_gmt_does_not_fatal() { 365 365 $this->make_user_by_role( 'author' ); 366 $date_string = 'invalid 366 $date_string = 'invalid_date'; 367 367 $post = array( 368 368 'post_title' => 'test', … … 373 373 $fetched_post = get_post( $result ); 374 374 $this->assertStringMatchesFormat( '%d', $result ); 375 $this->assertEquals( ' 1970-01-01 00:00:00', $fetched_post->post_date_gmt);375 $this->assertEquals( '0000-00-00', substr( $fetched_post->post_date_gmt, 0, 10 ) ); 376 376 } 377 377
Note: See TracChangeset
for help on using the changeset viewer.