WordPress.org

Make WordPress Core

Changeset 49488


Ignore:
Timestamp:
11/03/2020 03:50:51 PM (4 months ago)
Author:
johnbillion
Message:

Tests: Remove some useless assertions from the image editor tests.

In each of these instances the variable being tested is a directly instantiated object and can never be a WP_Error, unlike when wp_get_image_editor() is used.

See #51344

Location:
trunk/tests/phpunit/tests/image
Files:
2 edited

Legend:

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

    r48937 r49488  
    532532
    533533        $editor = new WP_Image_Editor_GD( $file );
    534                 $this->assertNotWPError( $editor );
    535534                $editor->load();
    536535                $editor->rotate( 180 );
  • trunk/tests/phpunit/tests/image/editorImagick.php

    r49230 r49488  
    466466
    467467        $editor = new WP_Image_Editor_Imagick( $file );
    468 
    469         $this->assertNotWPError( $editor );
    470 
    471468        $editor->load();
    472469        $editor->resize( 5, 5 );
     
    493490
    494491        $editor = new WP_Image_Editor_Imagick( $file );
    495 
    496         $this->assertNotWPError( $editor );
    497 
    498492        $editor->load();
    499493
     
    526520        $image_editor = new WP_Image_Editor_Imagick( $save_to_file );
    527521        $image_editor->load();
    528         $this->assertNotWPError( $image_editor );
    529522        $image_editor->rotate( 180 );
    530523        $image_editor->save( $save_to_file );
Note: See TracChangeset for help on using the changeset viewer.