From e79b0e6b25e2afbe568da545af4ec12f8a38a8d3 Mon Sep 17 00:00:00 2001 From: Jan Jakes Date: Thu, 31 Mar 2022 15:32:37 +0200 Subject: [PATCH] Activate automation for integration tests [MAILPOET-4207] --- mailpoet/tests/integration/_bootstrap.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/mailpoet/tests/integration/_bootstrap.php b/mailpoet/tests/integration/_bootstrap.php index cafb7d8362..6a9ffd0898 100644 --- a/mailpoet/tests/integration/_bootstrap.php +++ b/mailpoet/tests/integration/_bootstrap.php @@ -1,8 +1,13 @@ get(Migrator::class); +$container->get(FeatureFlagsController::class)->set(FeaturesController::AUTOMATION, true); +if ($migrator->hasSchema()) { + $migrator->deleteSchema(); +} +$migrator->createSchema(); +$action = [$container->get(MailPoetIntegration::class), 'register']; +if (!has_action(Hooks::INITIALIZE, $action) && is_callable($action)) { + add_action(Hooks::INITIALIZE, $action); + $container->get(Engine::class)->initialize(); +} + /** * @property IntegrationTester $tester */