diff --git a/tests/phpunit/tests/image/editor_gd.php b/tests/phpunit/tests/image/editor_gd.php index ecb599e839..cdfc207d7a 100644 --- a/tests/phpunit/tests/image/editor_gd.php +++ b/tests/phpunit/tests/image/editor_gd.php @@ -468,7 +468,7 @@ class Tests_Image_Editor_GD extends WP_Image_UnitTestCase { */ public function test_image_preserves_alpha_on_resize() { if ( ! ( imagetypes() & IMG_PNG ) ) { - $this->markTestSkipped( 'This test requires PHP to be compiled with PNG support.' ); + $this->fail( 'This test requires PHP to be compiled with PNG support.' ); } $file = DIR_TESTDATA . '/images/transparent.png'; @@ -495,7 +495,7 @@ class Tests_Image_Editor_GD extends WP_Image_UnitTestCase { */ public function test_image_preserves_alpha() { if ( ! ( imagetypes() & IMG_PNG ) ) { - $this->markTestSkipped( 'This test requires PHP to be compiled with PNG support.' ); + $this->fail( 'This test requires PHP to be compiled with PNG support.' ); } $file = DIR_TESTDATA . '/images/transparent.png'; @@ -521,7 +521,7 @@ class Tests_Image_Editor_GD extends WP_Image_UnitTestCase { */ public function test_image_preserves_alpha_on_rotate() { if ( ! ( imagetypes() & IMG_PNG ) ) { - $this->markTestSkipped( 'This test requires PHP to be compiled with PNG support.' ); + $this->fail( 'This test requires PHP to be compiled with PNG support.' ); } $file = DIR_TESTDATA . '/images/transparent.png'; diff --git a/tests/phpunit/tests/image/functions.php b/tests/phpunit/tests/image/functions.php index 7ed2f0b1b2..27bdbf3181 100644 --- a/tests/phpunit/tests/image/functions.php +++ b/tests/phpunit/tests/image/functions.php @@ -289,7 +289,7 @@ class Tests_Image_Functions extends WP_UnitTestCase { public function test_wp_crop_image_file() { if ( !function_exists( 'imagejpeg' ) ) - $this->markTestSkipped( 'jpeg support unavailable' ); + $this->fail( 'jpeg support unavailable' ); $file = wp_crop_image( DIR_TESTDATA . '/images/canola.jpg', 0, 0, 100, 100, 100, 100 ); @@ -305,7 +305,7 @@ class Tests_Image_Functions extends WP_UnitTestCase { public function test_wp_crop_image_url() { if ( !function_exists( 'imagejpeg' ) ) - $this->markTestSkipped( 'jpeg support unavailable' ); + $this->fail( 'jpeg support unavailable' ); if ( ! extension_loaded( 'openssl' ) ) { $this->markTestSkipped( 'Tests_Image_Functions::test_wp_crop_image_url() requires openssl.' ); diff --git a/tests/phpunit/tests/image/intermediate_size.php b/tests/phpunit/tests/image/intermediate_size.php index 09419a247e..3fcdf8cd29 100644 --- a/tests/phpunit/tests/image/intermediate_size.php +++ b/tests/phpunit/tests/image/intermediate_size.php @@ -30,7 +30,7 @@ class Tests_Image_Intermediate_Size extends WP_UnitTestCase { function test_make_intermediate_size_width() { if ( !function_exists( 'imagejpeg' ) ) - $this->markTestSkipped( 'jpeg support unavailable' ); + $this->fail( 'jpeg support unavailable' ); $image = image_make_intermediate_size( DIR_TESTDATA . '/images/a2-small.jpg', 100, 0, false ); @@ -39,7 +39,7 @@ class Tests_Image_Intermediate_Size extends WP_UnitTestCase { function test_make_intermediate_size_height() { if ( !function_exists( 'imagejpeg' ) ) - $this->markTestSkipped( 'jpeg support unavailable' ); + $this->fail( 'jpeg support unavailable' ); $image = image_make_intermediate_size( DIR_TESTDATA . '/images/a2-small.jpg', 0, 75, false ); @@ -48,7 +48,7 @@ class Tests_Image_Intermediate_Size extends WP_UnitTestCase { function test_make_intermediate_size_successful() { if ( !function_exists( 'imagejpeg' ) ) - $this->markTestSkipped( 'jpeg support unavailable' ); + $this->fail( 'jpeg support unavailable' ); $image = image_make_intermediate_size( DIR_TESTDATA . '/images/a2-small.jpg', 100, 75, true ); diff --git a/tests/phpunit/tests/image/resize.php b/tests/phpunit/tests/image/resize.php index 807b51ce1f..a775eb5f58 100644 --- a/tests/phpunit/tests/image/resize.php +++ b/tests/phpunit/tests/image/resize.php @@ -42,8 +42,7 @@ abstract class WP_Tests_Image_Resize_UnitTestCase extends WP_Image_UnitTestCase $image = $this->resize_helper( DIR_TESTDATA.'/images/test-image.png', 25, 25 ); if ( ! is_string( $image ) ) { // WP_Error, stop GLib-GObject-CRITICAL assertion - $this->markTestSkipped( sprintf( 'No PNG support in the editor engine %s on this system', $this->editor_engine ) ); - return; + $this->fail( sprintf( 'No PNG support in the editor engine %s on this system', $this->editor_engine ) ); } $this->assertEquals( 'test-image-25x25.png', basename( $image ) ); @@ -59,8 +58,7 @@ abstract class WP_Tests_Image_Resize_UnitTestCase extends WP_Image_UnitTestCase $image = $this->resize_helper( DIR_TESTDATA.'/images/test-image.gif', 25, 25 ); if ( ! is_string( $image ) ) { // WP_Error, stop GLib-GObject-CRITICAL assertion - $this->markTestSkipped( sprintf( 'No GIF support in the editor engine %s on this system', $this->editor_engine ) ); - return; + $this->fail( sprintf( 'No GIF support in the editor engine %s on this system', $this->editor_engine ) ); } $this->assertEquals( 'test-image-25x25.gif', basename( $image ) ); diff --git a/tests/phpunit/tests/import/parser.php b/tests/phpunit/tests/import/parser.php index 3e2ee20ee2..890fd0ac22 100644 --- a/tests/phpunit/tests/import/parser.php +++ b/tests/phpunit/tests/import/parser.php @@ -16,7 +16,7 @@ class Tests_Import_Parser extends WP_Import_UnitTestCase { define( 'WP_LOAD_IMPORTERS', true ); if ( ! file_exists( DIR_TESTDATA . '/plugins/wordpress-importer/wordpress-importer.php' ) ) { - $this->markTestSkipped( 'WordPress Importer plugin is not installed.' ); + $this->fail( 'WordPress Importer plugin is not installed.' ); } require_once DIR_TESTDATA . '/plugins/wordpress-importer/wordpress-importer.php'; diff --git a/tests/phpunit/tests/import/postmeta.php b/tests/phpunit/tests/import/postmeta.php index 0fd8daedf2..bf468a1d3e 100644 --- a/tests/phpunit/tests/import/postmeta.php +++ b/tests/phpunit/tests/import/postmeta.php @@ -16,7 +16,7 @@ class Tests_Import_Postmeta extends WP_Import_UnitTestCase { define( 'WP_LOAD_IMPORTERS', true ); if ( ! file_exists( DIR_TESTDATA . '/plugins/wordpress-importer/wordpress-importer.php' ) ) { - $this->markTestSkipped( 'WordPress Importer plugin is not installed.' ); + $this->fail( 'WordPress Importer plugin is not installed.' ); } require_once DIR_TESTDATA . '/plugins/wordpress-importer/wordpress-importer.php';