A few more wordpress.com https assets in unit tests.

See #31091.

git-svn-id: https://develop.svn.wordpress.org/trunk@31259 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Boone Gorges 2015-01-21 18:57:17 +00:00
parent cabab6c140
commit be28a2c9c5

View File

@ -292,7 +292,11 @@ class Tests_Image_Functions extends WP_UnitTestCase {
if ( !function_exists( 'imagejpeg' ) )
$this->markTestSkipped( 'jpeg support unavailable' );
$file = wp_crop_image( 'http://asdftestblog1.files.wordpress.com/2008/04/canola.jpg',
if ( ! extension_loaded( 'openssl' ) ) {
$this->markTestSkipped( 'Tests_Image_Functions::test_wp_crop_image_url() requires openssl.' );
}
$file = wp_crop_image( 'https://asdftestblog1.files.wordpress.com/2008/04/canola.jpg',
0, 0, 100, 100, 100, 100, false,
DIR_TESTDATA . '/images/' . rand_str() . '.jpg' );
$this->assertNotInstanceOf( 'WP_Error', $file );
@ -312,7 +316,11 @@ class Tests_Image_Functions extends WP_UnitTestCase {
}
public function test_wp_crop_image_url_not_exist() {
$file = wp_crop_image( 'http://asdftestblog1.files.wordpress.com/2008/04/canoladoesnotexist.jpg',
if ( ! extension_loaded( 'openssl' ) ) {
$this->markTestSkipped( 'Tests_Image_Functions::test_wp_crop_image_url_not_exist() requires openssl.' );
}
$file = wp_crop_image( 'https://asdftestblog1.files.wordpress.com/2008/04/canoladoesnotexist.jpg',
0, 0, 100, 100, 100, 100 );
$this->assertInstanceOf( 'WP_Error', $file );
}