Changeset 48912 for trunk/tests/phpunit/tests/date/getTheDate.php
- Timestamp:
- 08/31/2020 03:56:41 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/date/getTheDate.php
r48911 r48912 11 11 * @ticket 13771 12 12 */ 13 function test_get_the_date_ with_id_returns_correct_time() {13 function test_get_the_date_returns_correct_time_with_post_id() { 14 14 $post_id = self::factory()->post->create( array( 'post_date' => '2014-03-01 16:35:00' ) ); 15 15 16 $this->assertEquals( 'March 1, 2014', get_the_date( 'F j, Y', $post_id ) ); 16 17 } … … 27 28 28 29 /** 30 * @ticket 51184 31 */ 32 function test_get_the_date_returns_correct_time_with_empty_format() { 33 $post_id = self::factory()->post->create( array( 'post_date' => '2020-08-29 01:51:00' ) ); 34 35 $this->assertEquals( 'August 29, 2020', get_the_date( '', $post_id ) ); 36 $this->assertEquals( 'August 29, 2020', get_the_date( false, $post_id ) ); 37 } 38 39 /** 29 40 * @ticket 28310 30 41 */ 31 function test_get_the_time_ with_id_returns_correct_time() {42 function test_get_the_time_returns_correct_time_with_post_id() { 32 43 $post_id = self::factory()->post->create( array( 'post_date' => '2014-03-01 16:35:00' ) ); 44 33 45 $this->assertEquals( '16:35:00', get_the_time( 'H:i:s', $post_id ) ); 34 46 } … … 43 55 $this->assertFalse( get_the_time( 'h:i:s', 9 ) ); 44 56 } 57 58 /** 59 * @ticket 51184 60 */ 61 function test_get_the_time_returns_correct_time_with_empty_format() { 62 $post_id = self::factory()->post->create( array( 'post_date' => '2020-08-29 01:51:00' ) ); 63 64 $this->assertEquals( '1:51 am', get_the_time( '', $post_id ) ); 65 $this->assertEquals( '1:51 am', get_the_time( false, $post_id ) ); 66 } 45 67 }
Note: See TracChangeset
for help on using the changeset viewer.