function InstallerExistingConfigProfileHookInstall::testConfigSync

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

Confirms the installation has failed and the expected error is displayed.

Overrides InstallerConfigDirectoryTestBase::testConfigSync

File

core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigProfileHookInstall.php, line 67

Class

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

Namespace

Drupal\FunctionalTests\Installer

Code

public function testConfigSync() : void {
    $this->assertSession()
        ->titleEquals('Requirements problem | Drupal');
    $this->assertSession()
        ->pageTextContains($this->profile);
    $this->assertSession()
        ->pageTextContains('The selected profile has a hook_install() implementation and therefore can not be installed from configuration.');
}

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