diff --git a/tests/TestBootstrap.php b/tests/TestBootstrap.php index fbe4d5c..1bfc782 100644 --- a/tests/TestBootstrap.php +++ b/tests/TestBootstrap.php @@ -17,10 +17,20 @@ exit('Could not find TestBootstrapper.php'); } +$projectDir = $_SERVER['PROJECT_ROOT'] ?? dirname(__DIR__, 4); + +// Install dependency first: calling plugins install hook needs Assistant schema +(new TestBootstrapper()) + ->setProjectDir($projectDir) + ->setLoadEnvFile(true) + ->addActivePlugins('SwagMigrationAssistant') + ->bootstrap(); + return (new TestBootstrapper()) - ->setProjectDir($_SERVER['PROJECT_ROOT'] ?? dirname(__DIR__, 4)) + ->setProjectDir($projectDir) ->setLoadEnvFile(true) - ->addActivePlugins('SwagMigrationAssistant', 'SwagMigrationMagento') + ->setForceInstall(false) + ->setForceInstallPlugins(true) ->addCallingPlugin() ->bootstrap() ->setClassLoader(require dirname(__DIR__) . '/vendor/autoload.php')