Issue #2102459 by alexpott, vijaycs85, InternetDevels: Remove drupal_set_title() in Image module controllers.
parent
e04d6380cd
commit
f02aabb3d2
|
@ -52,11 +52,7 @@ class ImageStyleEditForm extends ImageStyleFormBase {
|
|||
* {@inheritdoc}
|
||||
*/
|
||||
public function form(array $form, array &$form_state) {
|
||||
|
||||
// @todo Remove drupal_set_title() in http://drupal.org/node/1981644
|
||||
$title = $this->t('Edit style %name', array('%name' => $this->entity->label()));
|
||||
drupal_set_title($title, PASS_THROUGH);
|
||||
|
||||
$form['#title'] = $this->t('Edit style %name', array('%name' => $this->entity->label()));
|
||||
$form['#tree'] = TRUE;
|
||||
$form['#attached']['css'][drupal_get_path('module', 'image') . '/css/image.admin.css'] = array();
|
||||
|
||||
|
|
|
@ -167,7 +167,7 @@ class ImageAdminStylesTest extends ImageFieldTestBase {
|
|||
// Test the style overview form.
|
||||
// Change the name of the style and adjust the weights of effects.
|
||||
$style_name = strtolower($this->randomName(10));
|
||||
$style_label = $this->randomString();
|
||||
$style_label = $this->randomName();
|
||||
$weight = count($effect_edits);
|
||||
$edit = array(
|
||||
'name' => $style_name,
|
||||
|
@ -189,7 +189,8 @@ class ImageAdminStylesTest extends ImageFieldTestBase {
|
|||
|
||||
// Check that the URL was updated.
|
||||
$this->drupalGet($style_path);
|
||||
$this->assertResponse(200, format_string('Image style %original renamed to %new', array('%original' => $style->label(), '%new' => $style_name)));
|
||||
$this->assertTitle(t('Edit style @name | Drupal', array('@name' => $style_label)));
|
||||
$this->assertResponse(200, format_string('Image style %original renamed to %new', array('%original' => $style->id(), '%new' => $style_name)));
|
||||
|
||||
// Check that the image was flushed after updating the style.
|
||||
// This is especially important when renaming the style. Make sure that
|
||||
|
|
Loading…
Reference in New Issue