diff --git a/core/modules/locale/src/Tests/LocaleAddJSTest.php b/core/modules/locale/src/Tests/LocaleAddJSTest.php index ab768f3..75c2e05 100644 --- a/core/modules/locale/src/Tests/LocaleAddJSTest.php +++ b/core/modules/locale/src/Tests/LocaleAddJSTest.php @@ -21,11 +21,12 @@ class LocaleAddJSTest extends WebTestBase { * * @var array */ - public static $modules = array('locale_test_add_js'); + public static $modules = ['locale_test_add_js']; + /** - * Tests adding a non-existent javascript file while the locale module - * is enabled, to ensure that an error message is not thrown. + * Tests adding a non-existent javascript file while the locale module is + * enabled, to ensure that an error message is not thrown. */ function testLocaleAddJS() { // Request a page that attempts to add a non-existent JavaScript file. diff --git a/core/modules/locale/tests/modules/locale_test_add_js/locale_test_add_js.info.yml b/core/modules/locale/tests/modules/locale_test_add_js/locale_test_add_js.info.yml index b3a69d6..2176fab 100644 --- a/core/modules/locale/tests/modules/locale_test_add_js/locale_test_add_js.info.yml +++ b/core/modules/locale/tests/modules/locale_test_add_js/locale_test_add_js.info.yml @@ -1,8 +1,8 @@ -name: Locale test add js +name: 'Locale test add js' type: module -description: Support module for adding javascript with the Interface Translation (locale) module enabled. +description: 'Support module for adding javascript with the Interface Translation (locale) module enabled.' package: Testing -version: 1.0 +version: VERSION core: 8.x dependencies: - locale diff --git a/core/modules/locale/tests/modules/locale_test_add_js/locale_test_add_js.module b/core/modules/locale/tests/modules/locale_test_add_js/locale_test_add_js.module index ae1d424..4fe4118 100644 --- a/core/modules/locale/tests/modules/locale_test_add_js/locale_test_add_js.module +++ b/core/modules/locale/tests/modules/locale_test_add_js/locale_test_add_js.module @@ -11,6 +11,5 @@ * Adds a non existent js file to the page */ function locale_test_add_js_page_attachments(&$page) { - $page['#attached']['library'][] = - drupal_get_path('module', 'locale_test_add_js') . '/non_existent_js_file.js'; + $page['#attached']['library'][] = 'drupal.locale_test_add_js'; }