mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
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:
parent
8d5bc0835b
commit
8fffa6c243
@ -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';
|
||||
|
||||
@ -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 );
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user