You are here

protected function InstallerExistingConfigProfileHookInstall::visitInstaller in Drupal 9

Same name and namespace in other branches
  1. 8 core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigProfileHookInstall.php \Drupal\FunctionalTests\Installer\InstallerExistingConfigProfileHookInstall::visitInstaller()
  2. 10 core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigProfileHookInstall.php \Drupal\FunctionalTests\Installer\InstallerExistingConfigProfileHookInstall::visitInstaller()

Visits the interactive installer.

Overrides InstallerTestBase::visitInstaller

File

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

Class

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

Namespace

Drupal\FunctionalTests\Installer

Code

protected function visitInstaller() {

  // Create an .install file with a hook_install() implementation.
  $path = $this->siteDirectory . '/profiles/' . $this->profile;
  $contents = <<<EOF
<?php

function config_profile_with_hook_install_install() {
}
EOF;
  file_put_contents("{$path}/{$this->profile}.install", $contents);
  parent::visitInstaller();
}