Changeset 38761
- Timestamp:
- 10/08/2016 10:42:12 PM (8 years ago)
- Location:
- trunk/tests/phpunit/tests
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/http/functions.php
r38759 r38761 4 4 * @group http 5 5 * @group external-http 6 *7 * @requires extension openssl8 6 */ 9 7 class Tests_HTTP_Functions extends WP_UnitTestCase { 8 public function setUp() { 9 if ( ! extension_loaded( 'openssl' ) ) { 10 $this->markTestSkipped( 'Tests_HTTP_Functions requires openssl.' ); 11 } 12 13 parent::setUp(); 14 } 10 15 11 16 function test_head_request() { -
trunk/tests/phpunit/tests/image/functions.php
r38759 r38761 109 109 * Test save image file and mime_types 110 110 * @ticket 6821 111 *112 * @requires extension fileinfo113 111 */ 114 112 public function test_wp_save_image_file() { 113 if ( ! extension_loaded( 'fileinfo' ) ) { 114 $this->markTestSkipped( 'The fileinfo PHP extension is not loaded.' ); 115 } 116 115 117 include_once( ABSPATH . 'wp-admin/includes/image-edit.php' ); 116 118 … … 159 161 * Test that a passed mime type overrides the extension in the filename 160 162 * @ticket 6821 161 *162 * @requires extension fileinfo163 163 */ 164 164 public function test_mime_overrides_filename() { 165 if ( ! extension_loaded( 'fileinfo' ) ) { 166 $this->markTestSkipped( 'The fileinfo PHP extension is not loaded.' ); 167 } 168 165 169 // Test each image editor engine 166 170 $classes = array('WP_Image_Editor_GD', 'WP_Image_Editor_Imagick'); … … 195 199 * Test that mime types are correctly inferred from file extensions 196 200 * @ticket 6821 197 *198 * @requires extension fileinfo199 201 */ 200 202 public function test_inferred_mime_types() { 203 if ( ! extension_loaded( 'fileinfo' ) ) { 204 $this->markTestSkipped( 'The fileinfo PHP extension is not loaded.' ); 205 } 206 201 207 // Mime types 202 208 $mime_types = array( … … 291 297 } 292 298 293 /**294 * @requires extension openssl295 * @requires function imagejpeg296 */297 299 public function test_wp_crop_image_url() { 300 if ( !function_exists( 'imagejpeg' ) ) 301 $this->markTestSkipped( 'jpeg support unavailable' ); 302 303 if ( ! extension_loaded( 'openssl' ) ) { 304 $this->markTestSkipped( 'Tests_Image_Functions::test_wp_crop_image_url() requires openssl.' ); 305 } 306 298 307 $file = wp_crop_image( 'https://asdftestblog1.files.wordpress.com/2008/04/canola.jpg', 299 308 0, 0, 100, 100, 100, 100, false, … … 315 324 } 316 325 317 /**318 * @requires extension openssl319 */320 326 public function test_wp_crop_image_url_not_exist() { 327 if ( ! extension_loaded( 'openssl' ) ) { 328 $this->markTestSkipped( 'Tests_Image_Functions::test_wp_crop_image_url_not_exist() requires openssl.' ); 329 } 330 321 331 $file = wp_crop_image( 'https://asdftestblog1.files.wordpress.com/2008/04/canoladoesnotexist.jpg', 322 332 0, 0, 100, 100, 100, 100 ); -
trunk/tests/phpunit/tests/image/meta.php
r38759 r38761 5 5 * @group media 6 6 * @group upload 7 *8 * @requires extension gd9 * @requires extension exif10 7 */ 11 8 class Tests_Image_Meta extends WP_UnitTestCase { 9 function setUp() { 10 if ( ! extension_loaded( 'gd' ) ) 11 $this->markTestSkipped( 'The gd PHP extension is not loaded.' ); 12 if ( ! extension_loaded( 'exif' ) ) 13 $this->markTestSkipped( 'The exif PHP extension is not loaded.' ); 14 if ( ! is_callable( 'wp_read_image_metadata' ) ) 15 $this->markTestSkipped( 'wp_read_image_metadata() is not callable.' ); 16 parent::setUp(); 17 } 12 18 13 19 function test_exif_d70() {
Note: See TracChangeset
for help on using the changeset viewer.