Ensure themes don't have to call add_image_size() to be used in unit tests.
props mboynes. fixes #29924. git-svn-id: https://develop.svn.wordpress.org/trunk@29874 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
31bed9ed11
commit
34a58febd8
@ -413,6 +413,11 @@ VIDEO;
|
||||
*/
|
||||
function test_add_image_size() {
|
||||
global $_wp_additional_image_sizes;
|
||||
|
||||
if ( ! isset( $_wp_additional_image_sizes ) ) {
|
||||
$_wp_additional_image_sizes = array();
|
||||
}
|
||||
|
||||
$this->assertArrayNotHasKey( 'test-size', $_wp_additional_image_sizes );
|
||||
add_image_size( 'test-size', 200, 600 );
|
||||
$this->assertArrayHasKey( 'test-size', $_wp_additional_image_sizes );
|
||||
|
Loading…
Reference in New Issue
Block a user