Mercurial > hg > isophonics-drupal-site
diff core/tests/Drupal/KernelTests/KernelTestBase.php @ 12:7a779792577d
Update Drupal core to v8.4.5 (via Composer)
author | Chris Cannam |
---|---|
date | Fri, 23 Feb 2018 15:52:07 +0000 |
parents | 4c8ae668cc8c |
children | 1fec387a4317 |
line wrap: on
line diff
--- a/core/tests/Drupal/KernelTests/KernelTestBase.php Fri Feb 23 15:51:18 2018 +0000 +++ b/core/tests/Drupal/KernelTests/KernelTestBase.php Fri Feb 23 15:52:07 2018 +0000 @@ -20,6 +20,7 @@ use Drupal\simpletest\AssertContentTrait; use Drupal\Tests\AssertHelperTrait; use Drupal\Tests\ConfigTestTrait; +use Drupal\Tests\PhpunitCompatibilityTrait; use Drupal\Tests\RandomGeneratorTrait; use Drupal\Tests\TestRequirementsTrait; use Drupal\simpletest\TestServiceProvider; @@ -76,6 +77,7 @@ use RandomGeneratorTrait; use ConfigTestTrait; use TestRequirementsTrait; + use PhpunitCompatibilityTrait; /** * {@inheritdoc} @@ -324,10 +326,10 @@ private function bootKernel() { $this->setSetting('container_yamls', []); // Allow for test-specific overrides. - $settings_services_file = $this->root . '/sites/default' . '/testing.services.yml'; + $settings_services_file = $this->root . '/sites/default/testing.services.yml'; if (file_exists($settings_services_file)) { // Copy the testing-specific service overrides in place. - $testing_services_file = $this->root . '/' . $this->siteDirectory . '/services.yml'; + $testing_services_file = $this->siteDirectory . '/services.yml'; copy($settings_services_file, $testing_services_file); $this->setSetting('container_yamls', [$testing_services_file]); } @@ -827,7 +829,7 @@ foreach ($modules as $module) { if ($module_handler->moduleExists($module)) { - throw new \LogicException("$module module is already enabled."); + continue; } $module_handler->addModule($module, $module_list[$module]->getPath()); // Maintain the list of enabled modules in configuration.