Make WordPress Core

Changeset 37327


Ignore:
Timestamp:
04/29/2016 04:15:37 PM (8 years ago)
Author:
wonderboymusic
Message:

Media/Unit Tests: ensure that the GD absrtraction is used for GD unit tests for Images. Some of the procedural GD API functions can still throw ImagickException, which is fun.

See #36588.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/image/resize.php

    r31257 r37327  
    1010
    1111abstract class WP_Tests_Image_Resize_UnitTestCase extends WP_Image_UnitTestCase {
     12
     13    public function setUp() {
     14        parent::setUp();
     15
     16        add_filter( 'wp_image_editors', array( $this, 'wp_image_editors' ) );
     17    }
     18
     19    public function tearDown() {
     20        remove_filter( 'wp_image_editors', array( $this, 'wp_image_editors' ) );
     21
     22        parent::tearDown();
     23    }
     24
     25    public function wp_image_editors() {
     26        return array( $this->editor_engine );
     27    }
    1228
    1329    function test_resize_jpg() {
Note: See TracChangeset for help on using the changeset viewer.