Changeset 37738 for trunk/tests/phpunit/tests/general/template.php
- Timestamp:
- 06/17/2016 05:11:29 AM (9 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/general/template.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/general/template.php
r37135 r37738 346 346 return $this->custom_logo_id; 347 347 } 348 349 /** 350 * Test get_the_modified_time 351 * 352 * @ticket 37059 353 * 354 * @since 4.6.0 355 */ 356 function test_get_the_modified_time_default() { 357 $details = array( 358 'post_date' => '2016-01-21 15:34:36', 359 'post_date_gmt' => '2016-01-21 15:34:36', 360 ); 361 $post_id = $this->factory->post->create( $details ); 362 $post = get_post( $post_id ); 363 364 $GLOBALS['post'] = $post; 365 366 $expected = '1453390476'; 367 $d = 'G'; 368 $actual = get_the_modified_time( $d ); 369 $this->assertEquals( $expected, $actual ); 370 } 371 372 /** 373 * Test get_the_modified_time with post_id parameter. 374 * 375 * @ticket 37059 376 * 377 * @since 4.6.0 378 */ 379 function test_get_the_modified_time_with_post_id() { 380 $details = array( 381 'post_date' => '2016-01-21 15:34:36', 382 'post_date_gmt' => '2016-01-21 15:34:36', 383 ); 384 $post_id = $this->factory->post->create( $details ); 385 $d = 'G'; 386 $expected = '1453390476'; 387 $actual = get_the_modified_time( $d, $post_id ); 388 $this->assertEquals( $expected, $actual ); 389 } 348 390 }
Note: See TracChangeset
for help on using the changeset viewer.