Changeset 825 in tests
- Timestamp:
- 06/30/2012 10:23:51 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-testcase/test_image.php
r685 r825 1 1 <?php 2 2 3 class TestImageMetaFunctions extends WP TestCase {3 class TestImageMetaFunctions extends WP_UnitTestCase { 4 4 function setUp() { 5 $this->checkPHPExtension('gd'); 6 $this->checkPHPExtension('exif'); 7 if (!is_callable('wp_read_image_metadata')) 8 $this->markTestSkipped('wp_read_image_metadata() is not callable.'); 5 if ( ! extension_loaded( 'gd' ) ) 6 $this->markTestSkipped( 'The gd PHP extension is not loaded.' ); 7 if ( ! extension_loaded( 'exif' ) ) 8 $this->markTestSkipped( 'The exif PHP extension is not loaded.' ); 9 if ( ! is_callable( 'wp_read_image_metadata' ) ) 10 $this->markTestSkipped( 'wp_read_image_metadata() is not callable.' ); 9 11 parent::setUp(); 10 12 } … … 130 132 } 131 133 132 class TestImageSizeFunctions extends W pTestCase {134 class TestImageSizeFunctions extends WP_UnitTestCase { 133 135 function test_constrain_dims_zero() { 134 136 if (!is_callable('wp_constrain_dimensions')) … … 322 324 } 323 325 324 class TestImageResizeDimensions extends WP TestCase {326 class TestImageResizeDimensions extends WP_UnitTestCase { 325 327 function test_400x400_no_crop() { 326 328 // landscape: resize 640x480 to fit 400x400: 400x300 … … 447 449 } 448 450 449 class TestImageResize extends WP TestCase {451 class TestImageResize extends WP_UnitTestCase { 450 452 // image_resize( $file, $max_w, $max_h, $crop=false, $suffix=null, $dest_path=null, $jpeg_quality=75) 451 453 452 454 function setUp() { 453 $this->checkPHPExtension('gd'); 455 if ( ! extension_loaded( 'gd' ) ) 456 $this->markTestSkipped( 'The gd PHP extension is not loaded.' ); 454 457 parent::setUp(); 455 458 } … … 566 569 } 567 570 568 class TestIsImageFunctions extends WP TestCase {571 class TestIsImageFunctions extends WP_UnitTestCase { 569 572 function test_is_image_positive() { 570 573 // these are all image files recognized by php
Note: See TracChangeset
for help on using the changeset viewer.