diff --git a/core/lib/Drupal/Core/Test/TestUpdateRegistry.php b/core/lib/Drupal/Core/Test/TestUpdateRegistry.php index a62b12d..841f707 100644 --- a/core/lib/Drupal/Core/Test/TestUpdateRegistry.php +++ b/core/lib/Drupal/Core/Test/TestUpdateRegistry.php @@ -1,13 +1,15 @@ configImporter()->import(); + $error_log = []; } catch (ConfigImporterException $e) { $this->assertEqual($e->getMessage(), 'There were errors validating the config synchronization.'); $error_log = $this->configImporter->getErrors(); - $expected = array('Pending database updates available.'); - $this->assertEqual($expected, $error_log); } + $this->assertEqual(['Pending database updates available.'], $error_log); // Run database updates. $this->runUpdates(); diff --git a/core/tests/Drupal/KernelTests/KernelTestBase.php b/core/tests/Drupal/KernelTests/KernelTestBase.php index 766cc4f..45d0256 100644 --- a/core/tests/Drupal/KernelTests/KernelTestBase.php +++ b/core/tests/Drupal/KernelTests/KernelTestBase.php @@ -17,6 +17,7 @@ use Drupal\Core\Language\Language; use Drupal\Core\Site\Settings; use Drupal\Core\Test\TestDatabase; +use Drupal\Core\Test\TestUpdateRegistry; use Drupal\simpletest\AssertContentTrait; use Drupal\simpletest\AssertHelperTrait; use Drupal\Tests\ConfigTestTrait; @@ -618,7 +619,7 @@ public function register(ContainerBuilder $container) { // We don't care about post updates in the kernel test base. $container->removeDefinition('update.post_update_registry'); - $container->register('update.post_update_registry', 'Drupal\Core\Update\UpdateRegistryTest'); + $container->register('update.post_update_registry', TestUpdateRegistry::class); if ($container->hasDefinition('path_processor_alias')) { // Prevent the alias-based path processor, which requires a url_alias db @@ -812,7 +813,7 @@ protected function installSchema($module, $tables) { // Set a very high schema version so no updates are found because we // don't want to run them anyway. - drupal_set_installed_schema_version($module, 8888); + drupal_set_installed_schema_version($module, PHP_INT_MAX); } }