Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / system / tests / modules / system_test / system_test.module
index 81739086c32701545c98b072e42860c1fcc6abd0..affc20ea4203897d4366138df7c91c96e8ced2b2 100644 (file)
@@ -27,7 +27,7 @@ function system_test_help($route_name, RouteMatchInterface $route_match) {
 function system_test_modules_installed($modules) {
   if (\Drupal::state()->get('system_test.verbose_module_hooks')) {
     foreach ($modules as $module) {
-      drupal_set_message(t('hook_modules_installed fired for @module', ['@module' => $module]));
+      \Drupal::messenger()->addStatus(t('hook_modules_installed fired for @module', ['@module' => $module]));
     }
   }
 }
@@ -38,7 +38,7 @@ function system_test_modules_installed($modules) {
 function system_test_modules_uninstalled($modules) {
   if (\Drupal::state()->get('system_test.verbose_module_hooks')) {
     foreach ($modules as $module) {
-      drupal_set_message(t('hook_modules_uninstalled fired for @module', ['@module' => $module]));
+      \Drupal::messenger()->addStatus(t('hook_modules_uninstalled fired for @module', ['@module' => $module]));
     }
   }
 }
@@ -90,7 +90,7 @@ function system_test_page_attachments(array &$page) {
   // \Drupal::service('path.matcher')->isFrontPage().
   $frontpage = \Drupal::state()->get('system_test.front_page_output') ?: 0;
   if ($frontpage && \Drupal::service('path.matcher')->isFrontPage()) {
-    drupal_set_message(t('On front page.'));
+    \Drupal::messenger()->addStatus(t('On front page.'));
   }
 }