public function LocaleLibraryInfoAlterTest::testLibraryInfoAlter

Verifies that the datepicker can be localized.

See also

locale_library_info_alter()

File

drupal/core/modules/locale/lib/Drupal/locale/Tests/LocaleLibraryInfoAlterTest.php, line 38
Definition of Drupal\locale\Tests\LocaleLibraryInfoAlterTest.

Class

LocaleLibraryInfoAlterTest
Tests localization of the JavaScript libraries.

Namespace

Drupal\locale\Tests

Code

public function testLibraryInfoAlter() {
  drupal_add_library('system', 'jquery.ui.datepicker');
  $scripts = drupal_get_js();
  $this
    ->assertTrue(strpos($scripts, 'locale.datepicker.js'), t('locale.datepicker.js added to scripts.'));
}