Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / system / tests / modules / menu_test / src / TestControllers.php
index 31fb341afb028a5804f4e51a4a77c43e74e4ad38..dafaab0e511cceb11cac02c34da85d37cea5a134 100644 (file)
@@ -2,7 +2,7 @@
 
 namespace Drupal\menu_test;
 
-use Drupal\Component\Utility\SafeMarkup;
+use Drupal\Component\Render\FormattableMarkup;
 
 /**
  * Controllers for testing the menu integration routing system.
@@ -38,7 +38,7 @@ class TestControllers {
       $_SESSION['menu_test'] = 0;
     }
     $_SESSION['menu_test']++;
-    return ['#markup' => SafeMarkup::format('Session menu_test is @count', ['@count' => $_SESSION['menu_test']])];
+    return ['#markup' => new FormattableMarkup('Session menu_test is @count', ['@count' => $_SESSION['menu_test']])];
   }
 
   /**
@@ -59,7 +59,7 @@ class TestControllers {
    */
   public function testDefaults($placeholder = NULL) {
     if ($placeholder) {
-      return ['#markup' => SafeMarkup::format("Sometimes there is a placeholder: '@placeholder'.", ['@placeholder' => $placeholder])];
+      return ['#markup' => new FormattableMarkup("Sometimes there is a placeholder: '@placeholder'.", ['@placeholder' => $placeholder])];
     }
     else {
       return ['#markup' => 'Sometimes there is no placeholder.'];
@@ -77,9 +77,9 @@ class TestControllers {
         '#contextual_links' => [
           'menu_test_menu' => [
             'route_parameters' => ['bar' => 1],
-          ]
-        ]
-      ]
+          ],
+        ],
+      ],
     ];
   }