Mercurial > hg > isophonics-drupal-site
comparison core/tests/Drupal/FunctionalTests/Installer/InstallerExistingSettingsTest.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | c2387f117808 |
children |
comparison
equal
deleted
inserted
replaced
16:c2387f117808 | 17:129ea1e6d783 |
---|---|
1 <?php | 1 <?php |
2 | 2 |
3 namespace Drupal\FunctionalTests\Installer; | 3 namespace Drupal\FunctionalTests\Installer; |
4 | 4 |
5 use Drupal\Core\Site\Settings; | |
6 use Drupal\Core\Database\Database; | 5 use Drupal\Core\Database\Database; |
7 use Drupal\Core\DrupalKernel; | 6 use Drupal\Core\DrupalKernel; |
8 use Symfony\Component\HttpFoundation\Request; | 7 use Symfony\Component\HttpFoundation\Request; |
9 | 8 |
10 /** | 9 /** |
24 parent::prepareEnvironment(); | 23 parent::prepareEnvironment(); |
25 // Pre-configure hash salt. | 24 // Pre-configure hash salt. |
26 // Any string is valid, so simply use the class name of this test. | 25 // Any string is valid, so simply use the class name of this test. |
27 $this->settings['settings']['hash_salt'] = (object) [ | 26 $this->settings['settings']['hash_salt'] = (object) [ |
28 'value' => __CLASS__, | 27 'value' => __CLASS__, |
29 'required' => TRUE, | |
30 ]; | |
31 | |
32 // During interactive install we'll change this to a different profile and | |
33 // this test will ensure that the new value is written to settings.php. | |
34 $this->settings['settings']['install_profile'] = (object) [ | |
35 'value' => 'minimal', | |
36 'required' => TRUE, | 28 'required' => TRUE, |
37 ]; | 29 ]; |
38 | 30 |
39 // Pre-configure database credentials. | 31 // Pre-configure database credentials. |
40 $connection_info = Database::getConnectionInfo(); | 32 $connection_info = Database::getConnectionInfo(); |
71 * Verifies that installation succeeded. | 63 * Verifies that installation succeeded. |
72 */ | 64 */ |
73 public function testInstaller() { | 65 public function testInstaller() { |
74 $this->assertUrl('user/1'); | 66 $this->assertUrl('user/1'); |
75 $this->assertResponse(200); | 67 $this->assertResponse(200); |
76 $this->assertEqual('testing', \Drupal::installProfile(), 'Profile was changed from minimal to testing during interactive install.'); | 68 $this->assertEqual('testing', \Drupal::installProfile()); |
77 $this->assertEqual('testing', Settings::get('install_profile'), 'Profile was correctly changed to testing in Settings.php'); | |
78 } | 69 } |
79 | 70 |
80 } | 71 } |