protected function TestImageStyleConfiguration::createConfigToExport in Configuration Management 7.2
This function creates the configurations that will be exported by configuration management.
Overrides ConfigurationHandlerBaseTestCase::createConfigToExport
File
- tests/
handlers/ TestImageStyleConfiguration.test, line 88 - Tests for Configuration Management: Image Styles.
Class
- TestImageStyleConfiguration
- @file Tests for Configuration Management: Image Styles.
Code
protected function createConfigToExport() {
$web_user = $this
->drupalCreateUser(array(
'administer image styles',
));
$this
->drupalLogin($web_user);
$style_name = strtolower($this
->randomName(10));
$edit = array(
'label' => $style_name,
'name' => $style_name,
);
$this
->drupalPost('admin/config/media/image-styles/add', $edit, t('Create new style'));
$this
->assertRaw(t('Style %name was created.', array(
'%name' => $style_name,
)), t('Image style successfully created.'));
$edit = array();
$edit['new'] = 'image_resize';
$this
->drupalPost(NULL, $edit, t('Add'));
$edit = array();
$edit['data[width]'] = 100;
$edit['data[height]'] = 100;
$this
->drupalPost(NULL, $edit, t('Add effect'));
$this
->assertRaw(t('The image effect was successfully applied.'));
$this->style_name = $style_name;
}