diff --git a/tests/fixtures/modules/woot_deploy/woot_deploy.deploy.php b/tests/fixtures/modules/woot_deploy/woot_deploy.deploy.php new file mode 100644 index 0000000000..044bf3e1ac --- /dev/null +++ b/tests/fixtures/modules/woot_deploy/woot_deploy.deploy.php @@ -0,0 +1,17 @@ +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()); + } }