[wp-trac] [WordPress Trac] #29924: Unit tests require that the theme call add_image_size()
WordPress Trac
noreply at wordpress.org
Sat Oct 11 03:44:58 UTC 2014
#29924: Unit tests require that the theme call add_image_size()
------------------------------+-----------------------------
Reporter: mboynes | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Build/Test Tools | Version:
Severity: normal | Keywords:
Focuses: |
------------------------------+-----------------------------
Today I ran core's unit tests with Underscores active and ran into the
following error:
{{{
1) Tests_Media::test_add_image_size
PHPUnit_Framework_Exception: Argument #2 (No Value) of
PHPUnit_Framework_Assert::assertArrayNotHasKey() must be a array or
ArrayAccess
/var/www/wordpress-develop/tests/phpunit/tests/media.php:416
}}}
It turns out the theme used for unit tests must call `add_image_size()`,
otherwise `global $_wp_additional_image_sizes` is null.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/29924>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list