diff --git a/core/modules/edit/lib/Drupal/edit/Tests/EditLoadingTest.php b/core/modules/edit/lib/Drupal/edit/Tests/EditLoadingTest.php index 7b01ade..d3e474c 100644 --- a/core/modules/edit/lib/Drupal/edit/Tests/EditLoadingTest.php +++ b/core/modules/edit/lib/Drupal/edit/Tests/EditLoadingTest.php @@ -165,7 +165,7 @@ function testUserWithPermission() { $this->assertIdentical('settings', $ajax_commands[0]['command'], 'The first AJAX command is a settings command.'); // Second command: insert libraries into DOM. $this->assertIdentical('insert', $ajax_commands[1]['command'], 'The second AJAX command is an append command.'); - $command = new AppendCommand('body', '' . "\n"); + $command = new AppendCommand('body', '' . "\n"); $this->assertIdentical($command->render(), $ajax_commands[1], 'The append command contains the expected data.'); // Retrieving the form for this field should result in a 200 response, diff --git a/core/modules/locale/lib/Drupal/locale/LocaleLookup.php b/core/modules/locale/lib/Drupal/locale/LocaleLookup.php index 6881092..8603f67 100644 --- a/core/modules/locale/lib/Drupal/locale/LocaleLookup.php +++ b/core/modules/locale/lib/Drupal/locale/LocaleLookup.php @@ -97,7 +97,7 @@ protected function resolveCacheMiss($offset) { $this->stringStorage->createString(array( 'source' => $offset, 'context' => $this->context, - 'version' => VERSION + 'version' => \Drupal::VERSION ))->addLocation('path', request_uri())->save(); $value = TRUE; } diff --git a/core/modules/locale/lib/Drupal/locale/StringDatabaseStorage.php b/core/modules/locale/lib/Drupal/locale/StringDatabaseStorage.php index 4860819..b1c5571 100644 --- a/core/modules/locale/lib/Drupal/locale/StringDatabaseStorage.php +++ b/core/modules/locale/lib/Drupal/locale/StringDatabaseStorage.php @@ -83,7 +83,7 @@ public function findTranslation(array $conditions) { if (!empty($values)) { $string = new TranslationString($values); - $this->checkVersion($string, VERSION); + $this->checkVersion($string, \Drupal::VERSION); $string->setStorage($this); return $string; } @@ -156,7 +156,7 @@ protected function updateLocation($string) { // This is a new location to add, take care not to duplicate. $this->connection->merge('locales_location', $this->options) ->key(array('sid' => $string->getId(), 'type' => $type, 'name' => $name)) - ->fields(array('version' => VERSION)) + ->fields(array('version' => \Drupal::VERSION)) ->execute(); $created = TRUE; } @@ -165,7 +165,7 @@ protected function updateLocation($string) { } if ($created) { // As we've set a new location, check string version too. - $this->checkVersion($string, VERSION); + $this->checkVersion($string, \Drupal::VERSION); } } } diff --git a/core/modules/locale/lib/Drupal/locale/Tests/LocaleStringTest.php b/core/modules/locale/lib/Drupal/locale/Tests/LocaleStringTest.php index 26b8080..caf19ce 100644 --- a/core/modules/locale/lib/Drupal/locale/Tests/LocaleStringTest.php +++ b/core/modules/locale/lib/Drupal/locale/Tests/LocaleStringTest.php @@ -73,7 +73,7 @@ function testStringCRUDAPI() { // Check version handling and updating. $this->assertEqual($source->version, 'none', 'String originally created without version.'); $string = $this->storage->findTranslation(array('lid' => $source->lid)); - $this->assertEqual($string->version, VERSION, 'Checked and updated string version to Drupal version.'); + $this->assertEqual($string->version, \Drupal::VERSION, 'Checked and updated string version to Drupal version.'); // Create translation and find it by lid and source. $langcode = 'es'; diff --git a/core/modules/system/lib/Drupal/system/Tests/Common/ParseInfoFileUnitTest.php b/core/modules/system/lib/Drupal/system/Tests/Common/ParseInfoFileUnitTest.php index c02e006..00acbaf 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Common/ParseInfoFileUnitTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Common/ParseInfoFileUnitTest.php @@ -27,7 +27,7 @@ public static function getInfo() { function testParseInfoFile() { $info_values = drupal_parse_info_file(drupal_get_path('module', 'system') . '/tests/common_test_info.txt'); $this->assertEqual($info_values['simple_string'], 'A simple string', 'Simple string value was parsed correctly.', 'System'); - $this->assertEqual($info_values['version'], VERSION, 'Constant value was parsed correctly.', 'System'); + $this->assertEqual($info_values['version'], \Drupal::VERSION, 'Constant value was parsed correctly.', 'System'); $this->assertEqual($info_values['double_colon'], 'dummyClassName::', 'Value containing double-colon was parsed correctly.', 'System'); } } diff --git a/core/modules/system/lib/Drupal/system/Tests/System/AdminMetaTagTest.php b/core/modules/system/lib/Drupal/system/Tests/System/AdminMetaTagTest.php index 1b767e6..508ac2d 100644 --- a/core/modules/system/lib/Drupal/system/Tests/System/AdminMetaTagTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/System/AdminMetaTagTest.php @@ -25,7 +25,7 @@ public static function getInfo() { * Verify that the meta tag HTML is generated correctly. */ public function testMetaTag() { - list($version, ) = explode('.', VERSION); + list($version, ) = explode('.', \Drupal::VERSION); $string = ''; $this->drupalGet('node'); $this->assertRaw($string, 'Fingerprinting meta tag generated correctly.', 'System'); diff --git a/core/modules/system/system.api.php b/core/modules/system/system.api.php index 49e87a0..0b1fd81 100644 --- a/core/modules/system/system.api.php +++ b/core/modules/system/system.api.php @@ -2277,7 +2277,7 @@ function hook_requirements($phase) { if ($phase == 'runtime') { $requirements['drupal'] = array( 'title' => t('Drupal'), - 'value' => VERSION, + 'value' => \Drupal::VERSION, 'severity' => REQUIREMENT_INFO ); } diff --git a/core/modules/views/views.api.php b/core/modules/views/views.api.php index d57e28e..d426c6d 100644 --- a/core/modules/views/views.api.php +++ b/core/modules/views/views.api.php @@ -336,7 +336,7 @@ function hook_views_data_alter(array &$data) { function hook_views_query_substitutions(ViewExecutable $view) { // Example from views_views_query_substitutions(). return array( - '***CURRENT_VERSION***' => VERSION, + '***CURRENT_VERSION***' => \Drupal::VERSION, '***CURRENT_TIME***' => REQUEST_TIME, '***CURRENT_LANGUAGE***' => language(\Drupal\Core\Language\Language::TYPE_CONTENT)->id, '***DEFAULT_LANGUAGE***' => language_default()->id,