From c027282d8cc5f152bb8ca26d8f42e8f184897022 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Thu, 31 Aug 2023 10:13:35 +0200 Subject: [PATCH] Test: Load a module's composer autoloader --- library/Icinga/Application/Test.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/library/Icinga/Application/Test.php b/library/Icinga/Application/Test.php index 399a7d8b9..74321ea1b 100644 --- a/library/Icinga/Application/Test.php +++ b/library/Icinga/Application/Test.php @@ -118,6 +118,11 @@ class Test extends Cli if (is_dir($moduleTestPath)) { $this->getLoader()->registerNamespace('Tests\\' . $moduleNamespace . '\\Lib', $moduleTestPath); } + + $composerAutoloader = "$path/vendor/autoload.php"; + if (file_exists($composerAutoloader)) { + require_once $composerAutoloader; + } } return $this;