Opened 12 years ago
Closed 12 years ago
#29924 closed defect (bug) (fixed)
Unit tests require that the theme call add_image_size()
| Reported by: | mboynes | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.1 |
| Component: | Build/Test Tools | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
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.
Attachments (1)
Change History (3)
Note:
See TracTickets
for help on using tickets.
Ensure themes don't have to call add_image_size() to be used in unit tests