class InstallerExistingConfigSyncDirectoryProfileMismatchTest
Same name and namespace in other branches
- 11.x core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigSyncDirectoryProfileMismatchTest.php \Drupal\FunctionalTests\Installer\InstallerExistingConfigSyncDirectoryProfileMismatchTest
Verifies that installing from existing configuration works.
@group Installer
Hierarchy
- class \Drupal\Tests\BrowserTestBase uses \Drupal\Core\Test\FunctionalTestSetupTrait, \Drupal\Tests\UiHelperTrait, \Drupal\Core\Test\TestSetupTrait, \Drupal\Tests\block\Traits\BlockCreationTrait, \Drupal\FunctionalTests\AssertLegacyTrait, \Drupal\Tests\RandomGeneratorTrait, \Drupal\Tests\node\Traits\NodeCreationTrait, \Drupal\Tests\node\Traits\ContentTypeCreationTrait, \Drupal\Tests\ConfigTestTrait, \Drupal\Tests\TestRequirementsTrait, \Drupal\Tests\user\Traits\UserCreationTrait, \Drupal\Tests\XdebugRequestTrait, \Drupal\Tests\Traits\PhpUnitWarnings, \Drupal\Tests\PhpUnitCompatibilityTrait, \Symfony\Bridge\PhpUnit\ExpectDeprecationTrait, \Drupal\Tests\ExtensionListTestTrait implements \PHPUnit\Framework\TestCase
- class \Drupal\FunctionalTests\Installer\InstallerTestBase uses \Drupal\Tests\RequirementsPageTrait implements \Drupal\Tests\BrowserTestBase
- class \Drupal\FunctionalTests\Installer\InstallerExistingConfigTestBase implements \Drupal\FunctionalTests\Installer\InstallerTestBase
- class \Drupal\FunctionalTests\Installer\InstallerExistingConfigSyncDirectoryProfileMismatchTest implements \Drupal\FunctionalTests\Installer\InstallerExistingConfigTestBase
- class \Drupal\FunctionalTests\Installer\InstallerExistingConfigTestBase implements \Drupal\FunctionalTests\Installer\InstallerTestBase
- class \Drupal\FunctionalTests\Installer\InstallerTestBase uses \Drupal\Tests\RequirementsPageTrait implements \Drupal\Tests\BrowserTestBase
Expanded class hierarchy of InstallerExistingConfigSyncDirectoryProfileMismatchTest
File
-
core/
tests/ Drupal/ FunctionalTests/ Installer/ InstallerExistingConfigSyncDirectoryProfileMismatchTest.php, line 10
Namespace
Drupal\FunctionalTests\InstallerView source
class InstallerExistingConfigSyncDirectoryProfileMismatchTest extends InstallerExistingConfigTestBase {
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* {@inheritdoc}
*/
protected $profile = 'testing_config_install_multilingual';
/**
* {@inheritdoc}
*/
protected $existingSyncDirectory = TRUE;
/**
* {@inheritdoc}
*/
protected function getConfigTarball() {
return __DIR__ . '/../../../fixtures/config_install/multilingual.tar.gz';
}
/**
* Installer step: Configure settings.
*/
protected function setUpSettings() {
// Cause a profile mismatch by hacking the URL.
$this->drupalGet(str_replace($this->profile, 'minimal', $this->getUrl()));
parent::setUpSettings();
}
protected function setUpSite() {
// This step will not occur because there is an error.
}
/**
* Tests that profile mismatch fails to install.
*/
public function testConfigSync() {
$this->htmlOutput(NULL);
$this->assertSession()
->titleEquals('Configuration validation | Drupal');
$this->assertSession()
->pageTextContains('The configuration synchronization failed validation.');
$this->assertSession()
->pageTextContains('The selected installation profile minimal does not match the profile stored in configuration testing_config_install_multilingual.');
// Ensure there is no continuation button.
$this->assertSession()
->pageTextNotContains('Save and continue');
$this->assertSession()
->buttonNotExists('edit-submit');
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.