Changeset 38759
- Timestamp:
- 10/08/2016 01:19:11 AM (8 years ago)
- Location:
- trunk/tests/phpunit/tests
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/http/functions.php
r38758 r38759 4 4 * @group http 5 5 * @group external-http 6 * 7 * @requires extension openssl 6 8 */ 7 9 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 }15 10 16 11 function test_head_request() { -
trunk/tests/phpunit/tests/image/functions.php
r31512 r38759 109 109 * Test save image file and mime_types 110 110 * @ticket 6821 111 * 112 * @requires extension fileinfo 111 113 */ 112 114 public function test_wp_save_image_file() { 113 if ( ! extension_loaded( 'fileinfo' ) ) {114 $this->markTestSkipped( 'The fileinfo PHP extension is not loaded.' );115 }116 117 115 include_once( ABSPATH . 'wp-admin/includes/image-edit.php' ); 118 116 … … 161 159 * Test that a passed mime type overrides the extension in the filename 162 160 * @ticket 6821 161 * 162 * @requires extension fileinfo 163 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 169 165 // Test each image editor engine 170 166 $classes = array('WP_Image_Editor_GD', 'WP_Image_Editor_Imagick'); … … 199 195 * Test that mime types are correctly inferred from file extensions 200 196 * @ticket 6821 197 * 198 * @requires extension fileinfo 201 199 */ 202 200 public function test_inferred_mime_types() { 203 if ( ! extension_loaded( 'fileinfo' ) ) {204 $this->markTestSkipped( 'The fileinfo PHP extension is not loaded.' );205 }206 207 201 // Mime types 208 202 $mime_types = array( … … 297 291 } 298 292 293 /** 294 * @requires extension openssl 295 * @requires function imagejpeg 296 */ 299 297 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 307 298 $file = wp_crop_image( 'https://asdftestblog1.files.wordpress.com/2008/04/canola.jpg', 308 299 0, 0, 100, 100, 100, 100, false, … … 324 315 } 325 316 317 /** 318 * @requires extension openssl 319 */ 326 320 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 331 321 $file = wp_crop_image( 'https://asdftestblog1.files.wordpress.com/2008/04/canoladoesnotexist.jpg', 332 322 0, 0, 100, 100, 100, 100 ); -
trunk/tests/phpunit/tests/image/meta.php
r34374 r38759 5 5 * @group media 6 6 * @group upload 7 * 8 * @requires extension gd 9 * @requires extension exif 7 10 */ 8 11 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 }18 12 19 13 function test_exif_d70() {
Note: See TracChangeset
for help on using the changeset viewer.