function InstallerExistingConfigProfileHookInstallTest::visitInstaller
Overrides InstallerTestBase::visitInstaller
File
-
core/
tests/ Drupal/ FunctionalTests/ Installer/ InstallerExistingConfigProfileHookInstallTest.php, line 22
Class
- InstallerExistingConfigProfileHookInstallTest
- Verifies that profiles with hook_install() can't be installed from config.
Namespace
Drupal\FunctionalTests\InstallerCode
protected function visitInstaller() : void {
// 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();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.