Build/Test Tools: Convert more test skipping into hard failures. These dependencies should all be present when testing.
See #40533 git-svn-id: https://develop.svn.wordpress.org/trunk@40532 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
446189eac7
commit
669bd1bbc3
@ -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';
|
||||
|
@ -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.' );
|
||||
|
@ -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 );
|
||||
|
||||
|
@ -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 ) );
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
Loading…
Reference in New Issue
Block a user