diff --git a/core/modules/image/lib/Drupal/image/Form/ImageStyleEditForm.php b/core/modules/image/lib/Drupal/image/Form/ImageStyleEditForm.php index 8381a8a5e1c98a8640ccc7ec86f67b0bdabae8f0..50c665e2da24553ef1ab336fdd9d308c44538004 100644 --- a/core/modules/image/lib/Drupal/image/Form/ImageStyleEditForm.php +++ b/core/modules/image/lib/Drupal/image/Form/ImageStyleEditForm.php @@ -52,11 +52,7 @@ public static function create(ContainerInterface $container) { * {@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(); diff --git a/core/modules/image/lib/Drupal/image/Tests/ImageAdminStylesTest.php b/core/modules/image/lib/Drupal/image/Tests/ImageAdminStylesTest.php index 462b6e59bf54c90ec549142086c88e2f7d329579..c944ddd5541c6d3e7058117b8d67f04073dad4e9 100644 --- a/core/modules/image/lib/Drupal/image/Tests/ImageAdminStylesTest.php +++ b/core/modules/image/lib/Drupal/image/Tests/ImageAdminStylesTest.php @@ -167,7 +167,7 @@ function testStyle() { // 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 @@ function testStyle() { // 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