Skip to content
Snippets Groups Projects
Commit f02aabb3 authored by Dries Buytaert's avatar Dries Buytaert
Browse files

Issue #2102459 by alexpott, vijaycs85, InternetDevels: Remove...

Issue #2102459 by alexpott, vijaycs85, InternetDevels: Remove drupal_set_title() in Image module controllers.
parent e04d6380
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -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();
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment