WordPress.org

Make WordPress Core


Ignore:
Timestamp:
03/03/2014 05:59:11 PM (7 years ago)
Author:
nacin
Message:

Let get_the_date() accept a post object.

props tanner-m, adamsilverstein, bigdawggi.
fixes #13771.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/post.php

    r27081 r27380  
    866866        $this->assertNotEquals( $initial_counts->publish, $after_trash_counts->publish );
    867867    }
     868
     869    /**
     870     * @ticket 13771
     871     */
     872    function test_get_the_date_with_id() {
     873        $post_id = $this->factory->post->create( array( 'post_date' => '2014-03-01 16:35:00' ) );
     874        $this->assertEquals( 'March 1, 2014', get_the_date( 'F j, Y', $post_id ) );
     875    }
    868876}
Note: See TracChangeset for help on using the changeset viewer.