3 namespace Drupal\FunctionalTests\Installer;
6 * Verifies that profiles with hook_install() can't be installed from config.
10 class InstallerExistingConfigProfileHookInstall extends InstallerExistingConfigTestBase {
12 protected $profile = 'config_profile_with_hook_install';
17 protected function visitInstaller() {
18 // Create an .install file with a hook_install() implementation.
19 $path = $this->siteDirectory . '/profiles/' . $this->profile;
23 function config_profile_with_hook_install_install() {
26 file_put_contents("$path/{$this->profile}.install", $contents);
27 parent::visitInstaller();
31 * Installer step: Configure settings.
33 protected function setUpSettings() {
34 // There are errors therefore there is nothing to do here.
39 * Final installer step: Configure site.
41 protected function setUpSite() {
42 // There are errors therefore there is nothing to do here.
49 protected function getConfigTarball() {
50 // We're not going to get to the config import stage so this does not
52 return __DIR__ . '/../../../fixtures/config_install/testing_config_install_no_config.tar.gz';
56 * Confirms the installation has failed and the expected error is displayed.
58 public function testConfigSync() {
59 $this->assertTitle('Requirements problem | Drupal');
60 $this->assertText($this->profile);
61 $this->assertText('The selected profile has a hook_install() implementation and therefore can not be installed from configuration.');