core/modules/locale/src/Tests/LocaleLibraryAlterTest.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/modules/locale/src/Tests/LocaleLibraryAlterTest.php b/core/modules/locale/src/Tests/LocaleLibraryAlterTest.php index 66f318a..5b7d6df 100644 --- a/core/modules/locale/src/Tests/LocaleLibraryAlterTest.php +++ b/core/modules/locale/src/Tests/LocaleLibraryAlterTest.php @@ -6,6 +6,7 @@ namespace Drupal\locale\Tests; +use Drupal\Core\Asset\AttachedAssets; use Drupal\simpletest\WebTestBase; /** @@ -30,9 +31,9 @@ class LocaleLibraryAlterTest extends WebTestBase { * @see locale_library_alter() */ public function testLibraryAlter() { - $js_assets = $this->container->get('asset.resolver') - ->setLibraries(['core/jquery.ui.datepicker']) - ->getJsAssets(FALSE)[1]; + $assets = new AttachedAssets(); + $assets->setLibraries(['core/jquery.ui.datepicker']); + $js_assets = $this->container->get('asset.resolver')->getJsAssets($assets, FALSE)[0]; $this->assertTrue(array_key_exists('core/modules/locale/locale.datepicker.js', $js_assets), 'locale.datepicker.js added to scripts.'); } }