comparison core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigSyncDriectoryProfileMismatchTest.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents
children
comparison
equal deleted inserted replaced
16:c2387f117808 17:129ea1e6d783
1 <?php
2
3 namespace Drupal\FunctionalTests\Installer;
4
5 /**
6 * Verifies that installing from existing configuration works.
7 *
8 * @group Installer
9 */
10 class InstallerExistingConfigSyncDriectoryProfileMismatchTest extends InstallerExistingConfigTestBase {
11
12 /**
13 * {@inheritdoc}
14 */
15 protected $profile = 'testing_config_install_multilingual';
16
17 /**
18 * {@inheritdoc}
19 */
20 protected $existingSyncDirectory = TRUE;
21
22 /**
23 * {@inheritdoc}
24 */
25 protected function getConfigTarball() {
26 return __DIR__ . '/../../../fixtures/config_install/multilingual.tar.gz';
27 }
28
29 /**
30 * Installer step: Configure settings.
31 */
32 protected function setUpSettings() {
33 // Cause a profile mismatch by hacking the URL.
34 $this->drupalGet(str_replace($this->profile, 'minimal', $this->getUrl()));
35 parent::setUpSettings();
36 }
37
38 protected function setUpSite() {
39 // This step will not occur because there is an error.
40 return;
41 }
42
43 /**
44 * Tests that profile mismatch fails to install.
45 */
46 public function testConfigSync() {
47 $this->htmlOutput(NULL);
48 $this->assertTitle('Configuration validation | Drupal');
49 $this->assertText('The configuration synchronization failed validation.');
50 $this->assertText('The selected installation profile minimal does not match the profile stored in configuration testing_config_install_multilingual.');
51
52 // Ensure there is no continuation button.
53 $this->assertNoText('Save and continue');
54 $this->assertNoFieldById('edit-submit');
55 }
56
57 }