diff --git a/core/modules/system/tests/modules/common_test/common_test.routing.yml b/core/modules/system/tests/modules/common_test/common_test.routing.yml index b5de545..fb27e33 100644 --- a/core/modules/system/tests/modules/common_test/common_test.routing.yml +++ b/core/modules/system/tests/modules/common_test/common_test.routing.yml @@ -7,6 +7,7 @@ common_test_l_active_class: common_test_drupal_render_invalid_keys: pattern: 'common-test/drupal-render-invalid-keys' defaults: + _title: 'Drupal Render' _content: '\Drupal\common_test\Controller\CommonTestController::drupalRenderInvalidKeys' requirements: _permission: 'access content' diff --git a/core/modules/system/tests/modules/common_test/lib/Drupal/common_test/Controller/CommonTestController.php b/core/modules/system/tests/modules/common_test/lib/Drupal/common_test/Controller/CommonTestController.php index be2a182..93ca243 100644 --- a/core/modules/system/tests/modules/common_test/lib/Drupal/common_test/Controller/CommonTestController.php +++ b/core/modules/system/tests/modules/common_test/lib/Drupal/common_test/Controller/CommonTestController.php @@ -61,21 +61,18 @@ public function typeLinkActiveClass() { /** * Renders an element with an invalid render array key. + * + * @return array + * A render array. */ public function drupalRenderInvalidKeys() { - drupal_set_title('Drupal Render'); - define('SIMPLETEST_COLLECT_ERRORS', FALSE); // Keys that begin with # may contain a value of any type, otherwise they must // contain arrays. - $key = 'child'; - $value = 'This should be an array.'; - $element = array( - $key => $value, - ); + $element = array('child' => 'This should be an array.'); - return drupal_render($element); + return $element; } }