From 1add90127a0abf7ed3f6394bacf46031117d9d20 Mon Sep 17 00:00:00 2001
From: Alex Pott <alex.a.pott@googlemail.com>
Date: Wed, 4 Feb 2015 10:10:49 +0000
Subject: [PATCH] Issue #1987738 by Mile23: Convert menu_test_callback() to a
 new style controller

---
 .../system/src/Tests/Menu/MenuRouterTest.php       |  2 +-
 .../tests/modules/menu_test/menu_test.module       | 14 --------------
 .../src/Controller/MenuTestController.php          |  7 +++++--
 3 files changed, 6 insertions(+), 17 deletions(-)

diff --git a/core/modules/system/src/Tests/Menu/MenuRouterTest.php b/core/modules/system/src/Tests/Menu/MenuRouterTest.php
index 063169799ff2..d9e943c72d5c 100644
--- a/core/modules/system/src/Tests/Menu/MenuRouterTest.php
+++ b/core/modules/system/src/Tests/Menu/MenuRouterTest.php
@@ -199,7 +199,7 @@ protected function doTestExoticPath() {
       "%23%25%26%2B%2F%3F" . // Characters that look like a percent-escaped string.
       "éøïвβ中國書۞"; // Characters from various non-ASCII alphabets.
     $this->drupalGet($path);
-    $this->assertRaw('This is menu_test_callback().');
+    $this->assertRaw('This is the menuTestCallback content.');
   }
 
   /**
diff --git a/core/modules/system/tests/modules/menu_test/menu_test.module b/core/modules/system/tests/modules/menu_test/menu_test.module
index a87983b06909..ec916cb237d8 100644
--- a/core/modules/system/tests/modules/menu_test/menu_test.module
+++ b/core/modules/system/tests/modules/menu_test/menu_test.module
@@ -80,20 +80,6 @@ function menu_test_menu_local_tasks_alter(&$data, $route_name) {
   }
 }
 
-/**
- * Page callback: Provides a dummy function which can be used as a placeholder.
- *
- * @return string
- *   A string that can be used for comparison.
- *
- * @see menu_test_menu().
- *
- * @deprecated Use \Drupal\menu_test\Controller\MenuTestController::menuTestCallback()
- */
-function menu_test_callback() {
-  return ['#markup' => 'This is menu_test_callback().'];
-}
-
 /**
  * Page callback: Tests the theme negotiation functionality.
  *
diff --git a/core/modules/system/tests/modules/menu_test/src/Controller/MenuTestController.php b/core/modules/system/tests/modules/menu_test/src/Controller/MenuTestController.php
index 05b43331b6a9..eb7bec5852d0 100644
--- a/core/modules/system/tests/modules/menu_test/src/Controller/MenuTestController.php
+++ b/core/modules/system/tests/modules/menu_test/src/Controller/MenuTestController.php
@@ -13,10 +13,13 @@
 class MenuTestController {
 
   /**
-   * @todo Remove menu_test_callback().
+   * Some known placeholder content which can be used for testing.
+   *
+   * @return string
+   *   A string that can be used for comparison.
    */
   public function menuTestCallback() {
-    return menu_test_callback();
+    return ['#markup' => 'This is the menuTestCallback content.'];
   }
 
 
-- 
GitLab