Commit 5db19a05 authored by catch's avatar catch
Browse files

Issue #3080482 by Mile23, voleger, alexpott, larowlan: Decouple...

Issue #3080482 by Mile23, voleger, alexpott, larowlan: Decouple FunctionalTestSetupTrait from the simpletest module
parent ffce54ec
......@@ -776,8 +776,7 @@ protected function moduleData($module) {
// If a module is within a profile directory but specifies another
// profile for testing, it needs to be found in the parent profile.
$settings = $this->getConfigStorage()->read('simpletest.settings');
$parent_profile = !empty($settings['parent_profile']) ? $settings['parent_profile'] : NULL;
$parent_profile = Settings::get('test_parent_profile');
if ($parent_profile && !isset($profiles[$parent_profile])) {
// In case both profile directories contain the same extension, the
// actual profile always has precedence.
......
......@@ -233,7 +233,7 @@ public function setProfileDirectoriesFromSettings() {
// distribution we need to include the profile of the parent site (in
// which test runs are triggered).
if (drupal_valid_test_ua() && !drupal_installation_attempted()) {
$testing_profile = \Drupal::config('simpletest.settings')->get('parent_profile');
$testing_profile = Settings::get('test_parent_profile');
if ($testing_profile && $testing_profile != $profile) {
$this->profileDirectories[] = drupal_get_path('profile', $testing_profile);
}
......
......@@ -4,6 +4,7 @@
use Drupal\Core\Cache\CacheBackendInterface;
use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Site\Settings;
use Drupal\Core\State\StateInterface;
use Drupal\Core\StringTranslation\StringTranslationTrait;
......@@ -111,7 +112,7 @@ protected function getProfileDirectories(ExtensionDiscovery $discovery) {
// If a module is within a profile directory but specifies another
// profile for testing, it needs to be found in the parent profile.
$parent_profile = $this->configFactory->get('simpletest.settings')->get('parent_profile');
$parent_profile = Settings::get('test_parent_profile');
if ($parent_profile && !isset($profiles[$parent_profile])) {
// In case both profile directories contain the same extension, the
......
......@@ -107,7 +107,7 @@ protected function prepareSettings() {
];
// Add the parent profile's search path to the child site's search paths.
// @see \Drupal\Core\Extension\ExtensionDiscovery::getProfileDirectories()
$settings['conf']['simpletest.settings']['parent_profile'] = (object) [
$settings['setting']['test_parent_profile'] = (object) [
'value' => $this->originalProfile,
'required' => TRUE,
];
......@@ -137,7 +137,7 @@ protected function prepareSettings() {
$yaml = new SymfonyYaml();
$content = file_get_contents($directory . '/services.yml');
$services = $yaml->parse($content);
$services['services']['simpletest.config_schema_checker'] = [
$services['services']['testing.config_schema_checker'] = [
'class' => ConfigSchemaChecker::class,
'arguments' => ['@config.typed', $this->getConfigSchemaExclusions()],
'tags' => [['name' => 'event_subscriber']],
......
......@@ -351,7 +351,7 @@ public function containerBuild(ContainerBuilder $container) {
if ($this->strictConfigSchema) {
$container
->register('simpletest.config_schema_checker', ConfigSchemaChecker::class)
->register('testing.config_schema_checker', ConfigSchemaChecker::class)
->addArgument(new Reference('config.typed'))
->addArgument($this->getConfigSchemaExclusions())
->addTag('event_subscriber');
......
......@@ -532,7 +532,7 @@ public function register(ContainerBuilder $container) {
if ($this->strictConfigSchema) {
$container
->register('simpletest.config_schema_checker', ConfigSchemaChecker::class)
->register('testing.config_schema_checker', ConfigSchemaChecker::class)
->addArgument(new Reference('config.typed'))
->addArgument($this->getConfigSchemaExclusions())
->addTag('event_subscriber');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment