Ticket #22356: 22356.5.tests.diff

File 22356.5.tests.diff, 1.3 KB (added by scribu, 6 months ago)
Line 
1diff --git includes/mock-image-editor.php includes/mock-image-editor.php
2index c7d0a5a..c3d81a8 100644
3--- includes/mock-image-editor.php
4+++ includes/mock-image-editor.php
5@@ -1,13 +1,13 @@
6 <?php
7 
8-if (class_exists( 'WP_Image_Editor' ) ) :
9+if (class_exists( 'WP_Image_Editor_Base' ) ) :
10 
11-       class WP_Image_Editor_Mock extends WP_Image_Editor {
12+       class WP_Image_Editor_Mock extends WP_Image_Editor_Base {
13 
14                public static $load_return = true;
15                public static $test_return = true;
16 
17-               protected function load() {
18+               public function load() {
19                        return self::$load_return;
20                }
21                public static function test() {
22@@ -39,4 +39,4 @@ if (class_exists( 'WP_Image_Editor' ) ) :
23                }
24        }
25 
26-endif;
27\ No newline at end of file
28+endif;
29diff --git tests/image/editor.php tests/image/editor.php
30index 2000e67..5da13dd 100644
31--- tests/image/editor.php
32+++ tests/image/editor.php
33@@ -26,7 +26,7 @@ class Tests_Image_Editor extends WP_UnitTestCase {
34                // Mock up an abstract image editor based on WP_Image_Editor
35                // note: this *HAS* to start with 'WP_Image_Editor_'
36                $className = 'WP_Image_Editor_' . substr( md5( uniqid() ), -12 );
37-               $this->editor = $this->getMockForAbstractClass( 'WP_Image_Editor', array(
38+               $this->editor = $this->getMockForAbstractClass( 'WP_Image_Editor_Base', array(
39                        'get_size',
40                        'get_suffix'
41                ), $className, false );