diff -u b/core/modules/image/image.install b/core/modules/image/image.install --- b/core/modules/image/image.install +++ b/core/modules/image/image.install @@ -119,9 +119,6 @@ */ function _image_update_get_style_with_effects(array $style) { // Retrieve image effects. - // @todo Module updates are not able to invoke module hooks and API functions; - // additional information previously supplied via hook_image_effect_info() - // is not and cannot be taken into account. $effects = array(); $result = db_select('image_effects', NULL, array('fetch' => PDO::FETCH_ASSOC)) ->fields('image_effects') diff -u b/core/modules/system/lib/Drupal/system/Tests/Upgrade/ImageUpgradePathTest.php b/core/modules/system/lib/Drupal/system/Tests/Upgrade/ImageUpgradePathTest.php --- b/core/modules/system/lib/Drupal/system/Tests/Upgrade/ImageUpgradePathTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Upgrade/ImageUpgradePathTest.php @@ -37,7 +37,7 @@ $expected_styles['test-custom'] = array( 'name' => 'test-custom', 'effects' => array( - 'uuid1' => array( + 'image_rotate' => array( 'name' => 'image_rotate', 'data' => array( 'degrees' => '90', @@ -46,7 +46,7 @@ ), 'weight' => '1', ), - 'uuid2' => array( + 'image_desaturate' => array( 'name' => 'image_desaturate', 'data' => array(), 'weight' => '2', @@ -56,7 +56,7 @@ $expected_styles['thumbnail'] = array( 'name' => 'thumbnail', 'effects' => array ( - 'uuid1' => array( + 'image_scale' => array( 'name' => 'image_scale', 'data' => array ( 'width' => '177', @@ -69,17 +69,15 @@ ); foreach ($expected_styles as $name => $style) { $config = config('image.style.' . $name); - // Replace placeholder uuid + number keys with UUID's generated during by - // the image style upgrade functions. - $count = 1; + // Replace placeholder with image effect name keys with UUID's generated + // during by the image style upgrade functions. foreach ($config->get('effects') as $uuid => $effect) { // Copy placeholder data. - $style['effects'][$uuid] = $style['effects']['uuid' . $count]; + $style['effects'][$uuid] = $style['effects'][$effect['name']]; // Set the missing ieid key as this is unknown because it is a UUID. $style['effects'][$uuid]['ieid'] = $uuid; // Remove the placeholder data. - unset($style['effects']['uuid' . $count]); - $count++; + unset($style['effects'][$effect['name']]); } $this->assertEqual($this->sortByKey($style), $config->get(), format_string('@first is equal to @second.', array( '@first' => var_export($this->sortByKey($style), TRUE), @@ -112 +110 @@ -} \ No newline at end of file +} diff -u b/core/modules/system/tests/upgrade/drupal-7.image.database.php b/core/modules/system/tests/upgrade/drupal-7.image.database.php --- b/core/modules/system/tests/upgrade/drupal-7.image.database.php +++ b/core/modules/system/tests/upgrade/drupal-7.image.database.php @@ -2,9 +2,9 @@ /** * @file - * Database additions for language tests. Used in upgrade.language.test. + * Database additions for Drupal\system\Tests\Upgrade\ImageUpgradePathTest. * - * This dump only contains data and schema components relevant for language + * This dump only contains data and schema components relevant for image * functionality. The drupal-7.filled.database.php file is imported before * this dump, so the two form the database structure expected in tests * altogether.