diff --git a/core/modules/basic_auth/basic_auth.info.yml b/core/modules/basic_auth/basic_auth.info.yml index 38bb7b2..1cf687b 100644 --- a/core/modules/basic_auth/basic_auth.info.yml +++ b/core/modules/basic_auth/basic_auth.info.yml @@ -4,3 +4,5 @@ description: 'Provides the HTTP Basic authentication provider' package: Web services version: VERSION core: 8.x +dependencies: + - user diff --git a/core/tests/Drupal/KernelTests/Core/Asset/AttachedAssetsTest.php b/core/tests/Drupal/KernelTests/Core/Asset/AttachedAssetsTest.php index b5c363c..9132e9f 100644 --- a/core/tests/Drupal/KernelTests/Core/Asset/AttachedAssetsTest.php +++ b/core/tests/Drupal/KernelTests/Core/Asset/AttachedAssetsTest.php @@ -202,7 +202,7 @@ function testSettings() { $endToken = '}'; $start = strpos($rendered_js, $startToken); $end = strrpos($rendered_js, $endToken); - $json = Unicode::substr($rendered_js, $start, $end - $start + 1); + $json = Unicode::substr((string) $rendered_js, $start, $end - $start + 1); $parsed_settings = Json::decode($json); // Test whether the settings for core/drupalSettings are available. diff --git a/core/tests/Drupal/KernelTests/Core/Asset/ResolvedLibraryDefinitionsFilesMatchTest.php b/core/tests/Drupal/KernelTests/Core/Asset/ResolvedLibraryDefinitionsFilesMatchTest.php index 4b6fcfb..7b5d4d0 100644 --- a/core/tests/Drupal/KernelTests/Core/Asset/ResolvedLibraryDefinitionsFilesMatchTest.php +++ b/core/tests/Drupal/KernelTests/Core/Asset/ResolvedLibraryDefinitionsFilesMatchTest.php @@ -86,6 +86,11 @@ class ResolvedLibraryDefinitionsFilesMatchTest extends KernelTestBase { /** * {@inheritdoc} */ + public static $modules = ['system']; + + /** + * {@inheritdoc} + */ protected function setUp() { parent::setUp(); @@ -110,7 +115,8 @@ protected function setUp() { }); $this->allModules = array_keys($all_modules); sort($this->allModules); - $this->enableModules($this->allModules); + print_r($this->allModules); + $this->container->get('module_installer')->install($this->allModules); } /** diff --git a/core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTagTest.php b/core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTagTest.php index e2a4df7..484ee9c 100644 --- a/core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTagTest.php +++ b/core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTagTest.php @@ -24,8 +24,8 @@ class DatabaseBackendTagTest extends KernelTestBase { /** * {@inheritdoc} */ - public function containerBuild(ContainerBuilder $container) { - parent::containerBuild($container); + public function register(ContainerBuilder $container) { + parent::register($container); // Change container to database cache backends. $container ->register('cache_factory', 'Drupal\Core\Cache\CacheFactory') diff --git a/core/tests/Drupal/KernelTests/Core/DrupalKernel/DrupalKernelSiteTest.php b/core/tests/Drupal/KernelTests/Core/DrupalKernel/DrupalKernelSiteTest.php index 7ce1153..deea2a9 100644 --- a/core/tests/Drupal/KernelTests/Core/DrupalKernel/DrupalKernelSiteTest.php +++ b/core/tests/Drupal/KernelTests/Core/DrupalKernel/DrupalKernelSiteTest.php @@ -18,7 +18,7 @@ class DrupalKernelSiteTest extends KernelTestBase { public function testServicesYml() { $container_yamls = Settings::get('container_yamls'); $container_yamls[] = $this->siteDirectory . '/services.yml'; - $this->settingsSet('container_yamls', $container_yamls); + $this->setSetting('container_yamls', $container_yamls); $this->assertFalse($this->container->has('site.service.yml')); // A service provider class always has precedence over services.yml files. // KernelTestBase::buildContainer() swaps out many services with in-memory diff --git a/core/tests/Drupal/KernelTests/Core/DrupalKernel/DrupalKernelTest.php b/core/tests/Drupal/KernelTests/Core/DrupalKernel/DrupalKernelTest.php index 55626aa..8eadd70 100644 --- a/core/tests/Drupal/KernelTests/Core/DrupalKernel/DrupalKernelTest.php +++ b/core/tests/Drupal/KernelTests/Core/DrupalKernel/DrupalKernelTest.php @@ -22,7 +22,7 @@ protected function setUp() { // the DrupalKernel (re-)building itself. $this->prepareConfigDirectories(); - $this->settingsSet('php_storage', array('service_container' => array( + $this->setSetting('php_storage', array('service_container' => array( 'bin' => 'service_container', 'class' => 'Drupal\Component\PhpStorage\MTimeProtectedFileStorage', 'directory' => DRUPAL_ROOT . '/' . $this->publicFilesDirectory . '/php', diff --git a/core/tests/Drupal/KernelTests/Core/File/FileTestBase.php b/core/tests/Drupal/KernelTests/Core/File/FileTestBase.php index 7d33ce8..6b3ae83 100644 --- a/core/tests/Drupal/KernelTests/Core/File/FileTestBase.php +++ b/core/tests/Drupal/KernelTests/Core/File/FileTestBase.php @@ -69,6 +69,10 @@ protected function setUpFilesystem() { mkdir($this->siteDirectory . '/files/config/' . CONFIG_SYNC_DIRECTORY, 0775, TRUE); $this->setSetting('file_public_path', $public_file_directory); + + $GLOBALS['config_directories'] = array( + CONFIG_SYNC_DIRECTORY => $this->siteDirectory . '/files/config/sync', + ); } /** diff --git a/core/tests/Drupal/KernelTests/Core/Plugin/Condition/OptionalContextConditionTest.php b/core/tests/Drupal/KernelTests/Core/Plugin/Condition/OptionalContextConditionTest.php index e052071..96c8bac 100644 --- a/core/tests/Drupal/KernelTests/Core/Plugin/Condition/OptionalContextConditionTest.php +++ b/core/tests/Drupal/KernelTests/Core/Plugin/Condition/OptionalContextConditionTest.php @@ -23,7 +23,7 @@ class OptionalContextConditionTest extends KernelTestBase { /** * Tests with both contexts mapped to the same user. */ - protected function testContextMissing() { + public function testContextMissing() { /** @var \Drupal\Core\Condition\ConditionPluginBase $condition */ $condition = \Drupal::service('plugin.manager.condition') ->createInstance('condition_test_optional_context') @@ -37,7 +37,7 @@ protected function testContextMissing() { /** * Tests with both contexts mapped to the same user. */ - protected function testContextNoValue() { + public function testContextNoValue() { /** @var \Drupal\Core\Condition\ConditionPluginBase $condition */ $condition = \Drupal::service('plugin.manager.condition') ->createInstance('condition_test_optional_context') @@ -53,7 +53,7 @@ protected function testContextNoValue() { /** * Tests with both contexts mapped to the same user. */ - protected function testContextAvailable() { + public function testContextAvailable() { NodeType::create(['type' => 'example', 'name' => 'Example'])->save(); /** @var \Drupal\Core\Condition\ConditionPluginBase $condition */ $condition = \Drupal::service('plugin.manager.condition') diff --git a/core/tests/Drupal/KernelTests/Core/Theme/StableLibraryOverrideTest.php b/core/tests/Drupal/KernelTests/Core/Theme/StableLibraryOverrideTest.php index af54de4..00e964d 100644 --- a/core/tests/Drupal/KernelTests/Core/Theme/StableLibraryOverrideTest.php +++ b/core/tests/Drupal/KernelTests/Core/Theme/StableLibraryOverrideTest.php @@ -49,6 +49,11 @@ class StableLibraryOverrideTest extends KernelTestBase { /** * {@inheritdoc} */ + public static $modules = ['system']; + + /** + * {@inheritdoc} + */ protected function setUp() { parent::setUp(); @@ -70,7 +75,7 @@ protected function setUp() { }); $this->allModules = array_keys($all_modules); sort($this->allModules); - $this->enableModules($this->allModules); + $this->container->get('module_installer')->install($this->allModules); } /** diff --git a/core/tests/Drupal/KernelTests/KernelTestBase.php b/core/tests/Drupal/KernelTests/KernelTestBase.php index 01504b0..4af7e3f 100644 --- a/core/tests/Drupal/KernelTests/KernelTestBase.php +++ b/core/tests/Drupal/KernelTests/KernelTestBase.php @@ -278,10 +278,6 @@ protected function bootEnvironment() { $this->setUpFilesystem(); - $GLOBALS['config_directories'] = array( - CONFIG_SYNC_DIRECTORY => $this->siteDirectory . '/files/config/sync', - ); - foreach (Database::getAllConnectionInfo() as $key => $targets) { Database::removeConnection($key); } @@ -305,9 +301,13 @@ protected function setUpFilesystem() { mkdir($this->siteDirectory . '/files', 0775); mkdir($this->siteDirectory . '/files/config/' . CONFIG_SYNC_DIRECTORY, 0775, TRUE); - $settings = Settings::getAll(); + $settings = Settings::getInstance() ? Settings::getAll() : []; $settings['file_public_path'] = $this->siteDirectory . '/files'; new Settings($settings); + + $GLOBALS['config_directories'] = array( + CONFIG_SYNC_DIRECTORY => $this->siteDirectory . '/files/config/sync', + ); } /**