Skip to content

Commit

Permalink
fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
jturbide committed Feb 21, 2024
1 parent ec2c222 commit 84cf014
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/Unit/AbstractUnit.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 84cf014

Please sign in to comment.