diff --git includes/mock-image-editor.php includes/mock-image-editor.php
index c7d0a5a..c3d81a8 100644
|
|
|
1 | 1 | <?php |
2 | 2 | |
3 | | if (class_exists( 'WP_Image_Editor' ) ) : |
| 3 | if (class_exists( 'WP_Image_Editor_Base' ) ) : |
4 | 4 | |
5 | | class WP_Image_Editor_Mock extends WP_Image_Editor { |
| 5 | class WP_Image_Editor_Mock extends WP_Image_Editor_Base { |
6 | 6 | |
7 | 7 | public static $load_return = true; |
8 | 8 | public static $test_return = true; |
9 | 9 | |
10 | | protected function load() { |
| 10 | public function load() { |
11 | 11 | return self::$load_return; |
12 | 12 | } |
13 | 13 | public static function test() { |
… |
… |
if (class_exists( 'WP_Image_Editor' ) ) : |
39 | 39 | } |
40 | 40 | } |
41 | 41 | |
42 | | endif; |
43 | | No newline at end of file |
| 42 | endif; |
diff --git tests/image/editor.php tests/image/editor.php
index 2000e67..5da13dd 100644
|
|
class Tests_Image_Editor extends WP_UnitTestCase { |
26 | 26 | // Mock up an abstract image editor based on WP_Image_Editor |
27 | 27 | // note: this *HAS* to start with 'WP_Image_Editor_' |
28 | 28 | $className = 'WP_Image_Editor_' . substr( md5( uniqid() ), -12 ); |
29 | | $this->editor = $this->getMockForAbstractClass( 'WP_Image_Editor', array( |
| 29 | $this->editor = $this->getMockForAbstractClass( 'WP_Image_Editor_Base', array( |
30 | 30 | 'get_size', |
31 | 31 | 'get_suffix' |
32 | 32 | ), $className, false ); |