summaryrefslogtreecommitdiff
path: root/modules/image/image.test
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-04-22 21:43:59 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-04-22 21:43:59 +0000
commite2e096985fa42336c196facdf087d6e754e6b2cc (patch)
tree1df07420effa50173282341cd8401b0bebf760e2 /modules/image/image.test
parentcca6d06c01e377975e8625b6743d069e08b38684 (diff)
downloadbrdo-e2e096985fa42336c196facdf087d6e754e6b2cc.tar.gz
brdo-e2e096985fa42336c196facdf087d6e754e6b2cc.tar.bz2
#746500 by eojthebrave: Fixed Overriding default image styles does not work with more than one effect and has potential to overwrite existing effects.
Diffstat (limited to 'modules/image/image.test')
-rw-r--r--modules/image/image.test10
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/image/image.test b/modules/image/image.test
index 114cd59d5..fded5671d 100644
--- a/modules/image/image.test
+++ b/modules/image/image.test
@@ -536,6 +536,11 @@ class ImageAdminStylesUnitTest extends ImageFieldTestCase {
$image_path = $this->createSampleImage($style);
$this->assertEqual($this->getImageCount($style), 1, t('Image style %style image %file successfully generated.', array('%style' => $style['name'], '%file' => $image_path)));
+ // Verify that effects attached to a default style do not have an ieid key.
+ foreach ($style['effects'] as $effect) {
+ $this->assertFalse(isset($effect['ieid']), t('The %effect effect does not have an ieid.', array('%effect' => $effect['name'])));
+ }
+
// Override the default.
$this->drupalPost($edit_path, array(), t('Override defaults'));
$this->assertRaw(t('The %style style has been overridden, allowing you to change its settings.', array('%style' => $style_name)), t('Default image style may be overridden.'));
@@ -545,6 +550,11 @@ class ImageAdminStylesUnitTest extends ImageFieldTestCase {
drupal_static_reset('image_styles');
$style = image_style_load($style_name);
+ // Verify that effects attached to the style have an ieid now.
+ foreach ($style['effects'] as $effect) {
+ $this->assertTrue(isset($effect['ieid']), t('The %effect effect has an ieid.', array('%effect' => $effect['name'])));
+ }
+
// The style should now have 2 effect, the original scale provided by core
// and the desaturate effect we added in the override.
$effects = array_values($style['effects']);