Make WordPress Core


Ignore:
Timestamp:
03/13/2017 10:37:53 PM (8 years ago)
Author:
ocean90
Message:

Tests: Use https URLs for wordpress.com assets in Tests_HTTP_Functions and Tests_Image_Functions.

Merge of [31258] and [31259] to the 4.1 branch.
See #31091.

Location:
branches/4.1
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.1

  • branches/4.1/tests/phpunit/tests/image/functions.php

    r29834 r40287  
    293293            $this->markTestSkipped( 'jpeg support unavailable' );
    294294
    295         $file = wp_crop_image( 'http://asdftestblog1.files.wordpress.com/2008/04/canola.jpg',
     295        if ( ! extension_loaded( 'openssl' ) ) {
     296            $this->markTestSkipped( 'Tests_Image_Functions::test_wp_crop_image_url() requires openssl.' );
     297        }
     298
     299        $file = wp_crop_image( 'https://asdftestblog1.files.wordpress.com/2008/04/canola.jpg',
    296300                              0, 0, 100, 100, 100, 100, false,
    297301                              DIR_TESTDATA . '/images/' . rand_str() . '.jpg' );
     
    313317
    314318    public function test_wp_crop_image_url_not_exist() {
    315         $file = wp_crop_image( 'http://asdftestblog1.files.wordpress.com/2008/04/canoladoesnotexist.jpg',
     319        if ( ! extension_loaded( 'openssl' ) ) {
     320            $this->markTestSkipped( 'Tests_Image_Functions::test_wp_crop_image_url_not_exist() requires openssl.' );
     321        }
     322
     323        $file = wp_crop_image( 'https://asdftestblog1.files.wordpress.com/2008/04/canoladoesnotexist.jpg',
    316324                              0, 0, 100, 100, 100, 100 );
    317325        $this->assertInstanceOf( 'WP_Error', $file );
Note: See TracChangeset for help on using the changeset viewer.