mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-08 19:20:03 +00:00
Let get_the_date() accept a post object.
props tanner-m, adamsilverstein, bigdawggi. fixes #13771. git-svn-id: https://develop.svn.wordpress.org/trunk@27380 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -865,4 +865,12 @@ class Tests_Post extends WP_UnitTestCase {
|
||||
$this->assertEquals( 9, $after_trash_counts->publish );
|
||||
$this->assertNotEquals( $initial_counts->publish, $after_trash_counts->publish );
|
||||
}
|
||||
|
||||
/**
|
||||
* @ticket 13771
|
||||
*/
|
||||
function test_get_the_date_with_id() {
|
||||
$post_id = $this->factory->post->create( array( 'post_date' => '2014-03-01 16:35:00' ) );
|
||||
$this->assertEquals( 'March 1, 2014', get_the_date( 'F j, Y', $post_id ) );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user