Make WordPress Core

Ticket #22356: 22356.5.tests.diff

File 22356.5.tests.diff, 1.3 KB (added by scribu, 12 years ago)
  • includes/mock-image-editor.php

    diff --git includes/mock-image-editor.php includes/mock-image-editor.php
    index c7d0a5a..c3d81a8 100644
     
    11<?php
    22
    3 if (class_exists( 'WP_Image_Editor' ) ) :
     3if (class_exists( 'WP_Image_Editor_Base' ) ) :
    44
    5         class WP_Image_Editor_Mock extends WP_Image_Editor {
     5        class WP_Image_Editor_Mock extends WP_Image_Editor_Base {
    66
    77                public static $load_return = true;
    88                public static $test_return = true;
    99
    10                 protected function load() {
     10                public function load() {
    1111                        return self::$load_return;
    1212                }
    1313                public static function test() {
    if (class_exists( 'WP_Image_Editor' ) ) : 
    3939                }
    4040        }
    4141
    42 endif;
    43  No newline at end of file
     42endif;
  • tests/image/editor.php

    diff --git tests/image/editor.php tests/image/editor.php
    index 2000e67..5da13dd 100644
    class Tests_Image_Editor extends WP_UnitTestCase { 
    2626                // Mock up an abstract image editor based on WP_Image_Editor
    2727                // note: this *HAS* to start with 'WP_Image_Editor_'
    2828                $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(
    3030                        'get_size',
    3131                        'get_suffix'
    3232                ), $className, false );