mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Media/Unit Tests: ensure that image sizes are indeed removed when errors are raised before assertions in Tests_Media.
See #36588. git-svn-id: https://develop.svn.wordpress.org/trunk@37328 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -584,14 +584,19 @@ VIDEO;
|
||||
$_wp_additional_image_sizes = array();
|
||||
}
|
||||
|
||||
remove_image_size( 'test-size' );
|
||||
|
||||
$this->assertArrayNotHasKey( 'test-size', $_wp_additional_image_sizes );
|
||||
add_image_size( 'test-size', 200, 600 );
|
||||
$this->assertArrayHasKey( 'test-size', $_wp_additional_image_sizes );
|
||||
$this->assertEquals( 200, $_wp_additional_image_sizes['test-size']['width'] );
|
||||
$this->assertEquals( 600, $_wp_additional_image_sizes['test-size']['height'] );
|
||||
|
||||
$sizes = $_wp_additional_image_sizes;
|
||||
|
||||
// Clean up
|
||||
remove_image_size( 'test-size' );
|
||||
|
||||
$this->assertArrayHasKey( 'test-size', $sizes );
|
||||
$this->assertEquals( 200, $sizes['test-size']['width'] );
|
||||
$this->assertEquals( 600, $sizes['test-size']['height'] );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user