function ImageAdminStylesUnitTest::testOrphanedEffect
Test disabling a module providing an effect in use by an image style.
File
-
modules/
image/ image.test, line 928
Class
- ImageAdminStylesUnitTest
- Tests creation, deletion, and editing of image styles and effects.
Code
function testOrphanedEffect() {
// This will not check whether anything depends on the module.
module_disable(array(
'image_module_test',
), FALSE);
$this->drupalGet('admin/config/media/image-styles');
$this->assertText('Test Image Style', 'Image style with an orphaned effect displayed in the list of styles.');
$image_log = db_query_range('SELECT message FROM {watchdog} WHERE type = :type ORDER BY wid DESC', 0, 1, array(
':type' => 'image',
))->fetchField();
$this->assertEqual('Image style %style_name has an effect %effect_name with no definition.', $image_log, 'A watchdog message was logged for the broken image style effect');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.