comparison core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php @ 14:1fec387a4317

Update Drupal core to 8.5.2 via Composer
author Chris Cannam
date Mon, 23 Apr 2018 09:46:53 +0100
parents 4c8ae668cc8c
children 129ea1e6d783
comparison
equal deleted inserted replaced
13:5fb285c0d0e3 14:1fec387a4317
38 38
39 /** 39 /**
40 * The config directories used in this test. 40 * The config directories used in this test.
41 */ 41 */
42 protected $configDirectories = []; 42 protected $configDirectories = [];
43
44 /**
45 * The flag to set 'apcu_ensure_unique_prefix' setting.
46 *
47 * Wide use of a unique prefix can lead to problems with memory, if tests are
48 * run with a concurrency higher than 1. Therefore, FALSE by default.
49 *
50 * @var bool
51 *
52 * @see \Drupal\Core\Site\Settings::getApcuPrefix().
53 */
54 protected $apcuEnsureUniquePrefix = FALSE;
43 55
44 /** 56 /**
45 * Prepares site settings and services before installation. 57 * Prepares site settings and services before installation.
46 */ 58 */
47 protected function prepareSettings() { 59 protected function prepareSettings() {
81 // @see \Drupal\Core\Extension\ExtensionDiscovery::getProfileDirectories() 93 // @see \Drupal\Core\Extension\ExtensionDiscovery::getProfileDirectories()
82 $settings['conf']['simpletest.settings']['parent_profile'] = (object) [ 94 $settings['conf']['simpletest.settings']['parent_profile'] = (object) [
83 'value' => $this->originalProfile, 95 'value' => $this->originalProfile,
84 'required' => TRUE, 96 'required' => TRUE,
85 ]; 97 ];
98 $settings['settings']['apcu_ensure_unique_prefix'] = (object) [
99 'value' => $this->apcuEnsureUniquePrefix,
100 'required' => TRUE,
101 ];
86 $this->writeSettings($settings); 102 $this->writeSettings($settings);
87 // Allow for test-specific overrides. 103 // Allow for test-specific overrides.
88 $settings_testing_file = DRUPAL_ROOT . '/' . $this->originalSite . '/settings.testing.php'; 104 $settings_testing_file = DRUPAL_ROOT . '/' . $this->originalSite . '/settings.testing.php';
89 if (file_exists($settings_testing_file)) { 105 if (file_exists($settings_testing_file)) {
90 // Copy the testing-specific settings.php overrides in place. 106 // Copy the testing-specific settings.php overrides in place.