Make WordPress Core


Ignore:
Timestamp:
10/11/2014 04:22:11 AM (11 years ago)
Author:
SergeyBiryukov
Message:

Ensure themes don't have to call add_image_size() to be used in unit tests.

props mboynes.
fixes #29924.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/media.php

    r29515 r29874  
    414414    function test_add_image_size() {
    415415        global $_wp_additional_image_sizes;
     416
     417        if ( ! isset( $_wp_additional_image_sizes ) ) {
     418            $_wp_additional_image_sizes = array();
     419        }
     420
    416421        $this->assertArrayNotHasKey( 'test-size', $_wp_additional_image_sizes );
    417422        add_image_size( 'test-size', 200, 600 );
Note: See TracChangeset for help on using the changeset viewer.