Changeset 36565 for trunk/tests/phpunit/tests/post/attachments.php
- Timestamp:
- 02/17/2016 10:51:01 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/post/attachments.php
r35479 r36565 442 442 */ 443 443 public function test_wp_get_attachment_url_should_force_https_when_administering_over_https_and_siteurl_is_https() { 444 // Must set the upload_url_path to fake out `wp_upload_dir()`. 445 $siteurl = get_option( 'siteurl' ); 446 update_option( 'upload_url_path', set_url_scheme( $siteurl, 'https' ) . '/uploads' ); 444 // Set https upload URL 445 add_filter( 'upload_dir', '_upload_dir_https' ); 447 446 448 447 $filename = ( DIR_TESTDATA . '/images/test-image.jpg' ); … … 464 463 $_SERVER['HTTPS'] = $is_ssl ? 'on' : 'off'; 465 464 set_current_screen( 'front' ); 465 remove_filter( 'upload_dir', '_upload_dir_https' ); 466 466 467 467 $this->assertSame( set_url_scheme( $url, 'https' ), $url );
Note: See TracChangeset
for help on using the changeset viewer.