diff --git a/core/modules/system/tests/modules/test_page_test/lib/Drupal/test_page_test/Controller/Test.php b/core/modules/system/tests/modules/test_page_test/lib/Drupal/test_page_test/Controller/Test.php index 263964b..fb1ad60 100644 --- a/core/modules/system/tests/modules/test_page_test/lib/Drupal/test_page_test/Controller/Test.php +++ b/core/modules/system/tests/modules/test_page_test/lib/Drupal/test_page_test/Controller/Test.php @@ -31,9 +31,16 @@ public function renderTitle() { * */ public function testPage() { - drupal_add_js(array('test-setting' => 'azAZ09();.,\\\/-_{}'), array('type' => 'setting')); - drupal_set_title(t('Test page')); - return t('Test page text.'); + $build = array(); + $build['#attached'] = array( + 'js' => array( + array('test-setting' => 'azAZ09();.,\\\/-_{}'), + array('type' => 'setting') + ), + ); + $build['#title'] => 'Test page', + $build['#markup'] => 'Test page text.', + return $build; } }