@trigger_error('The path /admin/theme/update is deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Use /admin/appearance/update. See https://www.drupal.org/node/3382805',E_USER_DEPRECATED);
$warning_message=$this->t('You have been redirected from %old_path. Update links, shortcuts, and bookmarks to use %new_path.',$params);
$this->messenger()->addWarning($warning_message);
$this->getLogger('update')->warning('A user was redirected from %old_path to %new_path. This redirect will be removed in a future version of Drupal. Update links, shortcuts, and bookmarks to use %new_path. See %change_record for more information.',$params);
@@ -326,4 +326,15 @@ private function checkTableHeaders($table_locator, array $expected_headers) {
}
}
/**
* Tests the deprecation warnings.
*
* @group legacy
*/
publicfunctiontestDeprecationWarning(){
$this->drupalGet('admin/theme/update');
$this->expectDeprecation('The path /admin/theme/update is deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Use /admin/appearance/update. See https://www.drupal.org/node/3382805');
$this->assertSession()->statusMessageContains("You have been redirected from admin/theme/update. Update links, shortcuts, and bookmarks to use admin/appearance/update.",'warning');