WordPress.org

Make WordPress Core

Changeset 40532


Ignore:
Timestamp:
04/22/2017 10:11:56 PM (21 months ago)
Author:
johnbillion
Message:

Build/Test Tools: Convert more test skipping into hard failures. These dependencies should all be present when testing.

See #40533

Location:
trunk/tests/phpunit/tests
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/image/editor_gd.php

    r39580 r40532  
    469469    public function test_image_preserves_alpha_on_resize() {
    470470        if ( ! ( imagetypes() & IMG_PNG ) ) {
    471             $this->markTestSkipped( 'This test requires PHP to be compiled with PNG support.' );
     471            $this->fail( 'This test requires PHP to be compiled with PNG support.' );
    472472        }
    473473
     
    496496    public function test_image_preserves_alpha() {
    497497        if ( ! ( imagetypes() & IMG_PNG ) ) {
    498             $this->markTestSkipped( 'This test requires PHP to be compiled with PNG support.' );
     498            $this->fail( 'This test requires PHP to be compiled with PNG support.' );
    499499        }
    500500
     
    522522    public function test_image_preserves_alpha_on_rotate() {
    523523        if ( ! ( imagetypes() & IMG_PNG ) ) {
    524             $this->markTestSkipped( 'This test requires PHP to be compiled with PNG support.' );
     524            $this->fail( 'This test requires PHP to be compiled with PNG support.' );
    525525        }
    526526
  • trunk/tests/phpunit/tests/image/functions.php

    r40131 r40532  
    290290    public function test_wp_crop_image_file() {
    291291        if ( !function_exists( 'imagejpeg' ) )
    292             $this->markTestSkipped( 'jpeg support unavailable' );
     292            $this->fail( 'jpeg support unavailable' );
    293293
    294294        $file = wp_crop_image( DIR_TESTDATA . '/images/canola.jpg',
     
    306306    public function test_wp_crop_image_url() {
    307307        if ( !function_exists( 'imagejpeg' ) )
    308             $this->markTestSkipped( 'jpeg support unavailable' );
     308            $this->fail( 'jpeg support unavailable' );
    309309
    310310        if ( ! extension_loaded( 'openssl' ) ) {
  • trunk/tests/phpunit/tests/image/intermediate_size.php

    r38086 r40532  
    3131    function test_make_intermediate_size_width() {
    3232        if ( !function_exists( 'imagejpeg' ) )
    33             $this->markTestSkipped( 'jpeg support unavailable' );
     33            $this->fail( 'jpeg support unavailable' );
    3434
    3535        $image = image_make_intermediate_size( DIR_TESTDATA . '/images/a2-small.jpg', 100, 0, false );
     
    4040    function test_make_intermediate_size_height() {
    4141        if ( !function_exists( 'imagejpeg' ) )
    42             $this->markTestSkipped( 'jpeg support unavailable' );
     42            $this->fail( 'jpeg support unavailable' );
    4343
    4444        $image = image_make_intermediate_size( DIR_TESTDATA . '/images/a2-small.jpg', 0, 75, false );
     
    4949    function test_make_intermediate_size_successful() {
    5050        if ( !function_exists( 'imagejpeg' ) )
    51             $this->markTestSkipped( 'jpeg support unavailable' );
     51            $this->fail( 'jpeg support unavailable' );
    5252
    5353        $image = image_make_intermediate_size( DIR_TESTDATA . '/images/a2-small.jpg', 100, 75, true );
  • trunk/tests/phpunit/tests/image/resize.php

    r37327 r40532  
    4343
    4444        if ( ! is_string( $image ) ) {  // WP_Error, stop GLib-GObject-CRITICAL assertion
    45             $this->markTestSkipped( sprintf( 'No PNG support in the editor engine %s on this system', $this->editor_engine ) );
    46             return;
     45            $this->fail( sprintf( 'No PNG support in the editor engine %s on this system', $this->editor_engine ) );
    4746        }
    4847
     
    6059
    6160        if ( ! is_string( $image ) ) {  // WP_Error, stop GLib-GObject-CRITICAL assertion
    62             $this->markTestSkipped( sprintf( 'No GIF support in the editor engine %s on this system', $this->editor_engine ) );
    63             return;
     61            $this->fail( sprintf( 'No GIF support in the editor engine %s on this system', $this->editor_engine ) );
    6462        }
    6563
  • trunk/tests/phpunit/tests/import/parser.php

    r39174 r40532  
    1717
    1818        if ( ! file_exists( DIR_TESTDATA . '/plugins/wordpress-importer/wordpress-importer.php' ) ) {
    19             $this->markTestSkipped( 'WordPress Importer plugin is not installed.' );
     19            $this->fail( 'WordPress Importer plugin is not installed.' );
    2020        }
    2121
  • trunk/tests/phpunit/tests/import/postmeta.php

    r33250 r40532  
    1717
    1818        if ( ! file_exists( DIR_TESTDATA . '/plugins/wordpress-importer/wordpress-importer.php' ) ) {
    19             $this->markTestSkipped( 'WordPress Importer plugin is not installed.' );
     19            $this->fail( 'WordPress Importer plugin is not installed.' );
    2020        }
    2121
Note: See TracChangeset for help on using the changeset viewer.