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


git-svn-id: https://develop.svn.wordpress.org/trunk@49488 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn 2020-11-03 15:50:51 +00:00
parent 8d5bc0835b
commit 8fffa6c243
2 changed files with 0 additions and 8 deletions

View File

@ -531,7 +531,6 @@ class Tests_Image_Editor_GD extends WP_Image_UnitTestCase {
$expected = imagecolorsforindex( $image, $rgb );
$editor = new WP_Image_Editor_GD( $file );
$this->assertNotWPError( $editor );
$editor->load();
$editor->rotate( 180 );
$save_to_file = tempnam( get_temp_dir(), '' ) . '.png';

View File

@ -465,9 +465,6 @@ class Tests_Image_Editor_Imagick extends WP_Image_UnitTestCase {
$file = DIR_TESTDATA . '/images/transparent.png';
$editor = new WP_Image_Editor_Imagick( $file );
$this->assertNotWPError( $editor );
$editor->load();
$editor->resize( 5, 5 );
$save_to_file = tempnam( get_temp_dir(), '' ) . '.png';
@ -492,9 +489,6 @@ class Tests_Image_Editor_Imagick extends WP_Image_UnitTestCase {
$file = DIR_TESTDATA . '/images/transparent.png';
$editor = new WP_Image_Editor_Imagick( $file );
$this->assertNotWPError( $editor );
$editor->load();
$save_to_file = tempnam( get_temp_dir(), '' ) . '.png';
@ -525,7 +519,6 @@ class Tests_Image_Editor_Imagick extends WP_Image_UnitTestCase {
$image_editor = new WP_Image_Editor_Imagick( $save_to_file );
$image_editor->load();
$this->assertNotWPError( $image_editor );
$image_editor->rotate( 180 );
$image_editor->save( $save_to_file );