diff --git a/core/modules/system/tests/modules/theme_test/theme_test.module b/core/modules/system/tests/modules/theme_test/theme_test.module index 2d84114..40a78f3 100644 --- a/core/modules/system/tests/modules/theme_test/theme_test.module +++ b/core/modules/system/tests/modules/theme_test/theme_test.module @@ -9,11 +9,9 @@ function theme_test_theme($existing, $type, $theme, $path) { 'variables' => array('foo' => ''), ); $items['theme_test_template_test'] = array( - 'variables' => array(), 'template' => 'theme_test.template_test', ); $items['theme_test_template_test_2'] = array( - 'variables' => array(), 'template' => 'theme_test.template_test', ); $items['theme_test_foo'] = array( @@ -102,8 +100,7 @@ function theme_test_request_listener_page_callback() { * Menu callback for testing template overridding based on filename. */ function theme_test_template_test_page_callback() { - $theme_test_template_test = array('#theme' => 'theme_test_template_test'); - return drupal_render($theme_test_template_test); + return theme('theme_test_template_test'); } /** @@ -149,8 +146,7 @@ function _theme_test_alter() { * Page callback, calls a theme hook suggestion. */ function _theme_test_suggestion() { - $theme_test = array('#theme' => array('theme_test__suggestion', 'theme_test')); - return drupal_render($theme_test); + return theme(array('theme_test__suggestion', 'theme_test'), array()); } /** diff --git a/core/modules/system/tests/modules/twig_theme_test/lib/Drupal/twig_theme_test/TwigThemeTestController.php b/core/modules/system/tests/modules/twig_theme_test/lib/Drupal/twig_theme_test/TwigThemeTestController.php index e873956..9179de9 100644 --- a/core/modules/system/tests/modules/twig_theme_test/lib/Drupal/twig_theme_test/TwigThemeTestController.php +++ b/core/modules/system/tests/modules/twig_theme_test/lib/Drupal/twig_theme_test/TwigThemeTestController.php @@ -26,8 +26,7 @@ public static function create(ContainerInterface $container) { * Menu callback for testing PHP variables in a Twig template. */ public function phpVariablesRender() { - $twig_theme_test_php_variables = array('#theme' => 'twig_theme_test_php_variables'); - return drupal_render($twig_theme_test_php_variables); + return theme('twig_theme_test_php_variables'); } /** diff --git a/core/modules/system/tests/modules/twig_theme_test/twig_theme_test.module b/core/modules/system/tests/modules/twig_theme_test/twig_theme_test.module index cc74184..934d1b0 100644 --- a/core/modules/system/tests/modules/twig_theme_test/twig_theme_test.module +++ b/core/modules/system/tests/modules/twig_theme_test/twig_theme_test.module @@ -5,7 +5,6 @@ */ function twig_theme_test_theme($existing, $type, $theme, $path) { $items['twig_theme_test_php_variables'] = array( - 'variables' => array(), 'template' => 'twig_theme_test.php_variables', ); $items['twig_theme_test_trans'] = array(