Skip to content

Commit 5d007cc

Browse files
committed
Tests: Remove redundant wp_image_editors filter.
The `WP_Tests_Image_Resize_UnitTestCase` class extends `WP_Image_UnitTestCase`, which already has a `wp_image_editors` filter performing the same action. This also officially declares `$editor_engine` as a property in the base class. Props mukesh27. See #63167. git-svn-id: https://develop.svn.wordpress.org/trunk@60763 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 31cac36 commit 5d007cc

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

tests/phpunit/tests/image/base.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@
55
*/
66
abstract class WP_Image_UnitTestCase extends WP_UnitTestCase {
77

8+
/**
9+
* The image editing library class to use in tests.
10+
*
11+
* @var string
12+
*/
13+
public $editor_engine;
14+
815
/**
916
* Set the image editor engine according to the unit test's specification
1017
*/

tests/phpunit/tests/image/resize.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,6 @@ abstract class WP_Tests_Image_Resize_UnitTestCase extends WP_Image_UnitTestCase
1212

1313
public function set_up() {
1414
parent::set_up();
15-
16-
add_filter( 'wp_image_editors', array( $this, 'wp_image_editors' ) );
17-
}
18-
19-
public function wp_image_editors() {
20-
return array( $this->editor_engine );
2115
}
2216

2317
public function test_resize_jpg() {

0 commit comments

Comments
 (0)