Skip to content

Commit

Permalink
Test execution of deploy hooks inside a module with _deploy in the name.
Browse files Browse the repository at this point in the history
Test for #5216
  • Loading branch information
pfrenssen committed Aug 30, 2022
1 parent 2940512 commit 556228e
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/functional/DeployHookTest.php
Expand Up @@ -94,4 +94,22 @@ public function testSkipDeployHooks()
$this->drush('deploy:hook-status', [], $options, null, null, self::EXIT_SUCCESS);
$this->assertStringContainsString('[]', $this->getOutput());
}

public function testDeployHooksInModuleWithDeployInName()
{
$this->setUpDrupal(1, true);
$options = [
'yes' => null,
];
$this->setupModulesForTests(['woot_deploy'], Path::join(__DIR__, '/../fixtures/modules'));
$this->drush('pm-install', ['woot_deploy'], $options);

// Run deploy hooks.
$this->drush('deploy:hook', [], $options, null, null, self::EXIT_SUCCESS);

$this->assertStringContainsString('[notice] Deploy hook started: woot_deploy_deploy_function', $this->getErrorOutput());
$this->assertStringContainsString('[notice] This is the update message from woot_deploy_deploy_function', $this->getErrorOutput());
$this->assertStringContainsString('[notice] Performed: woot_deploy_deploy_function', $this->getErrorOutput());
$this->assertStringContainsString('[success] Finished performing deploy hooks.', $this->getErrorOutput());
}
}

0 comments on commit 556228e

Please sign in to comment.