function InstallerExistingConfigSyncDirectoryProfileHookInstall::testConfigSync

Same name in other branches
  1. 8.9.x core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigSyncDirectoryProfileHookInstall.php \Drupal\FunctionalTests\Installer\InstallerExistingConfigSyncDirectoryProfileHookInstall::testConfigSync()
  2. 10 core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigSyncDirectoryProfileHookInstall.php \Drupal\FunctionalTests\Installer\InstallerExistingConfigSyncDirectoryProfileHookInstall::testConfigSync()
  3. 11.x core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigSyncDirectoryProfileHookInstall.php \Drupal\FunctionalTests\Installer\InstallerExistingConfigSyncDirectoryProfileHookInstall::testConfigSync()

Tests installing from config is not available due to hook_INSTALL().

Overrides InstallerExistingConfigTestBase::testConfigSync

File

core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigSyncDirectoryProfileHookInstall.php, line 82

Class

InstallerExistingConfigSyncDirectoryProfileHookInstall
Verifies that profiles with hook_install() can't be installed from config.

Namespace

Drupal\FunctionalTests\Installer

Code

public function testConfigSync() {
    $this->assertSession()
        ->titleEquals('Select an installation profile | Drupal');
    $this->assertSession()
        ->responseNotContains('Use existing configuration');
    // Remove the install hook and the option to install from existing
    // configuration will be available.
    unlink("{$this->siteDirectory}/profiles/{$this->profile}/{$this->profile}.install");
    $this->getSession()
        ->reload();
    $this->assertSession()
        ->titleEquals('Select an installation profile | Drupal');
    $this->assertSession()
        ->responseContains('Use existing configuration');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.