Changeset 29062
- Timestamp:
- 07/10/2014 02:05:22 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/xmlrpc/wp/newPost.php
r29061 r29062 316 316 $fetched_post = get_post( $result ); 317 317 $this->assertStringMatchesFormat( '%d', $result ); 318 $this->assertEquals( '1970-01-01 00:00:00', $fetched_post->post_date ); 318 319 } 319 320 … … 328 329 $fetched_post = get_post( $result ); 329 330 $this->assertStringMatchesFormat( '%d', $result ); 331 $this->assertEquals( '1970-01-01 00:00:00', $fetched_post->post_date_gmt ); 332 } 333 334 /** 335 * @ticket 28601 336 */ 337 function test_valid_string_post_date() { 338 $this->make_user_by_role( 'author' ); 339 $date_string = '1984-01-11 05:00:00'; 340 $post = array( 'post_title' => 'test', 'post_content' => 'test', 'post_date' => $date_string ); 341 $result = $this->myxmlrpcserver->wp_newPost( array( 1, 'author', 'author', $post ) ); 342 $fetched_post = get_post( $result ); 343 $this->assertStringMatchesFormat( '%d', $result ); 344 $this->assertEquals( $date_string , $fetched_post->post_date ); 345 } 346 347 /** 348 * @ticket 28601 349 */ 350 function test_valid_string_post_date_gmt() { 351 $this->make_user_by_role( 'author' ); 352 $date_string = '1984-01-11 05:00:00'; 353 $post = array( 'post_title' => 'test', 'post_content' => 'test', 'post_date_gmt' => $date_string ); 354 $result = $this->myxmlrpcserver->wp_newPost( array( 1, 'author', 'author', $post ) ); 355 $fetched_post = get_post( $result ); 356 $this->assertStringMatchesFormat( '%d', $result ); 357 $this->assertEquals( $date_string , $fetched_post->post_date_gmt ); 330 358 } 331 359
Note: See TracChangeset
for help on using the changeset viewer.