LocaleLibraryAlterTest.php in Zircon Profile 8.0
File
core/modules/locale/src/Tests/LocaleLibraryAlterTest.php
View source
<?php
namespace Drupal\locale\Tests;
use Drupal\Core\Asset\AttachedAssets;
use Drupal\simpletest\WebTestBase;
class LocaleLibraryAlterTest extends WebTestBase {
public static $modules = array(
'locale',
);
public function testLibraryAlter() {
$assets = new AttachedAssets();
$assets
->setLibraries([
'core/jquery.ui.datepicker',
]);
$js_assets = $this->container
->get('asset.resolver')
->getJsAssets($assets, FALSE)[1];
$this
->assertTrue(array_key_exists('core/modules/locale/locale.datepicker.js', $js_assets), 'locale.datepicker.js added to scripts.');
}
}