// Disable fetching of advisories during tests to avoid outbound calls. This
// cannot be set in ::initConfig() because it would not stop these calls
// during install. Tests that need to have the security advisories
// functionality enabled should override this method and unset this
// variable.
// @see \Drupal\Tests\system\Functional\SecurityAdvisories\SecurityAdvisoryTest::writeSettings()
$settings['config'
]['system.advisories'
]['enabled'
] =
(object) [ 'value' => FALSE,
'required' => TRUE,
];
$this->
writeSettings($settings);
// Allow for test-specific overrides.
$settings_testing_file = DRUPAL_ROOT . '/' .
$this->originalSite . '/settings.testing.php';
if (file_exists($settings_testing_file)) { // Copy the testing-specific settings.php overrides in place.
copy($settings_testing_file,
$directory . '/settings.testing.php'
);
// Add the name of the testing class to settings.php and include the
// testing specific overrides.
file_put_contents($directory . '/settings.php', "\n\$test_class = '" .
static::
class D "';\n" . 'include DRUPAL_ROOT . \'/\' . $site_path . \'/settings.testing.php\';' . "\n", FILE_APPEND
);
} $settings_services_file = DRUPAL_ROOT . '/' .
$this->originalSite . '/testing.services.yml';
if (!
file_exists($settings_services_file)) {