Changeset 42343 for trunk/tests/phpunit/tests/general/template.php
- Timestamp:
- 11/30/2017 11:09:33 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/general/template.php
r40817 r42343 71 71 72 72 /** 73 73 * @group site_icon 74 74 * @group multisite 75 75 * @group ms-required … … 232 232 $contents = file_get_contents( $filename ); 233 233 234 $upload = wp_upload_bits( basename( $filename ), null, $contents );234 $upload = wp_upload_bits( basename( $filename ), null, $contents ); 235 235 $this->site_icon_url = $upload['url']; 236 237 236 238 237 // Save the data … … 324 323 restore_current_blog(); 325 324 326 $expected_custom_logo = 325 $expected_custom_logo = '<a href="' . $home_url . '" class="custom-logo-link" rel="home" itemprop="url">' . $image . '</a>'; 327 326 $this->assertEquals( $expected_custom_logo, get_custom_logo( $blog_id ) ); 328 327 } … … 367 366 update_post_meta( $this->custom_logo_id, '_wp_attachment_image_alt', $image_alt ); 368 367 369 $image = wp_get_attachment_image( $this->custom_logo_id, 'full', false, array( 370 'class' => 'custom-logo', 371 'itemprop' => 'logo', 372 ) ); 368 $image = wp_get_attachment_image( 369 $this->custom_logo_id, 'full', false, array( 370 'class' => 'custom-logo', 371 'itemprop' => 'logo', 372 ) 373 ); 373 374 374 375 $this->expectOutputString( '<a href="http://' . WP_TESTS_DOMAIN . '/" class="custom-logo-link" rel="home" itemprop="url">' . $image . '</a>' ); … … 423 424 function test_get_the_modified_time_default() { 424 425 $details = array( 425 'post_date'=> '2016-01-21 15:34:36',426 426 'post_date' => '2016-01-21 15:34:36', 427 'post_date_gmt' => '2016-01-21 15:34:36', 427 428 ); 428 429 $post_id = $this->factory->post->create( $details ); 429 $post = get_post( $post_id );430 $post = get_post( $post_id ); 430 431 431 432 $GLOBALS['post'] = $post; 432 433 433 434 $expected = '1453390476'; 434 $d = 'G';435 $actual = get_the_modified_time( $d );435 $d = 'G'; 436 $actual = get_the_modified_time( $d ); 436 437 $this->assertEquals( $expected, $actual ); 437 438 } … … 474 475 */ 475 476 function test_get_the_modified_date_with_post_id() { 476 $details = array(477 'post_date'=> '2016-01-21 15:34:36',478 479 ); 480 $post_id = $this->factory->post->create( $details );481 $d = 'Y-m-d';477 $details = array( 478 'post_date' => '2016-01-21 15:34:36', 479 'post_date_gmt' => '2016-01-21 15:34:36', 480 ); 481 $post_id = $this->factory->post->create( $details ); 482 $d = 'Y-m-d'; 482 483 $expected = '2016-01-21'; 483 $actual = get_the_modified_date( $d, $post_id );484 $actual = get_the_modified_date( $d, $post_id ); 484 485 $this->assertEquals( $expected, $actual ); 485 486 } … … 494 495 function test_get_the_modified_date_default() { 495 496 $details = array( 496 'post_date'=> '2016-01-21 15:34:36',497 497 'post_date' => '2016-01-21 15:34:36', 498 'post_date_gmt' => '2016-01-21 15:34:36', 498 499 ); 499 500 $post_id = $this->factory->post->create( $details ); 500 $post = get_post( $post_id );501 $post = get_post( $post_id ); 501 502 502 503 $GLOBALS['post'] = $post; 503 504 504 505 $expected = '2016-01-21'; 505 $d = 'Y-m-d';506 $actual = get_the_modified_date( $d );506 $d = 'Y-m-d'; 507 $actual = get_the_modified_date( $d ); 507 508 $this->assertEquals( $expected, $actual ); 508 509 } … … 545 546 */ 546 547 function test_get_the_modified_time_with_post_id() { 547 $details = array(548 'post_date'=> '2016-01-21 15:34:36',549 550 ); 551 $post_id = $this->factory->post->create( $details );552 $d = 'G';548 $details = array( 549 'post_date' => '2016-01-21 15:34:36', 550 'post_date_gmt' => '2016-01-21 15:34:36', 551 ); 552 $post_id = $this->factory->post->create( $details ); 553 $d = 'G'; 553 554 $expected = '1453390476'; 554 $actual = get_the_modified_time( $d, $post_id );555 $actual = get_the_modified_time( $d, $post_id ); 555 556 $this->assertEquals( $expected, $actual ); 556 557 }
Note: See TracChangeset
for help on using the changeset viewer.