From 84cf0146adeaab5df6665d51bf48e68bc4324ed9 Mon Sep 17 00:00:00 2001 From: Julien Turbide Date: Tue, 20 Feb 2024 20:01:47 -0500 Subject: [PATCH] fix unit test --- tests/Unit/AbstractUnit.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/Unit/AbstractUnit.php b/tests/Unit/AbstractUnit.php index 76d5e3d7..02faa510 100644 --- a/tests/Unit/AbstractUnit.php +++ b/tests/Unit/AbstractUnit.php @@ -54,17 +54,17 @@ public function getConfig(): Config */ protected function setUp(): void { - // Set your default path and namespace defined('VENDOR_PATH') || define('VENDOR_PATH', (getenv('VENDOR_PATH') ? getenv('VENDOR_PATH') : dirname(__DIR__) . '/../vendor')); - defined('APP_NAMESPACE') || define('APP_NAMESPACE', (getenv('APP_NAMESPACE') ? getenv('APP_NAMESPACE') : 'App')); - defined('APP_PATH') || define('APP_PATH', (getenv('APP_PATH') ? getenv('APP_PATH') : dirname(__DIR__) . '/../app')); + defined('APP_NAMESPACE') || define('APP_NAMESPACE', (getenv('APP_NAMESPACE') ? getenv('APP_NAMESPACE') : 'Zemit')); + defined('APP_PATH') || define('APP_PATH', (getenv('APP_PATH') ? getenv('APP_PATH') : dirname(__DIR__) . '/../src')); Env::setNames(['.env.testing']); - $this->loader = new Loader(); - $this->loader->setFiles([VENDOR_PATH . 'autoload.php']); - $this->loader->setNamespaces(['Zemit' => APP_PATH]); - $this->loader->register(); + $loader = new Loader(); + $loader->setFiles([VENDOR_PATH . '/autoload.php']); + $loader->setNamespaces([APP_NAMESPACE => APP_PATH]); + $loader->setFileCheckingCallback(null); + $loader->register(); $this->bootstrap = new Bootstrap($this->mode); $this->di = $this->bootstrap->di;