diff options
Diffstat (limited to 'tests/_support/Helper/Unit.php')
-rw-r--r-- | tests/_support/Helper/Unit.php | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/tests/_support/Helper/Unit.php b/tests/_support/Helper/Unit.php index 447192dd..dc44bc26 100644 --- a/tests/_support/Helper/Unit.php +++ b/tests/_support/Helper/Unit.php @@ -9,30 +9,19 @@ namespace Helper; \defined('IN_TEST') || \define('IN_TEST', true); use PHPPgAdmin\ContainerUtils; -if (!\is_readable(ContainerUtils::BASE_PATH . '/src/lib.inc.php')) { + +$bootstrapfile= dirname(__DIR__,3) . '/src/lib.inc.php'; +if (!\is_readable($bootstrapfile)) { die('lib.inc.php is not readable'); } -\defined('IN_TEST') || \define('IN_TEST', true); -require_once ContainerUtils::BASE_PATH . '/src/lib.inc.php'; +require_once $bootstrapfile; // here you can define custom actions // all public methods declared in helper class will be available in $I class Unit extends \Codeception\Module { - /** - * @var string - */ - const BASE_PATH = ContainerUtils::BASE_PATH; - /** - * @var string - */ - const SUBFOLDER = ContainerUtils::SUBFOLDER; - /** - * @var string - */ - const DEBUGMODE = ContainerUtils::DEBUGMODE; - + /** * @var \PHPPgAdmin */ @@ -40,16 +29,13 @@ class Unit extends \Codeception\Module private static $_conf; - public static function getDir() - { - return self::DIRNAME; - } + public static function getContainer() { //$conf = self::getConf(); if (!static::$_container) { - self::$_container = ContainerUtils::getContainerInstance(); + self::$_container = containerInstance(); } //dump(PHP_SAPI); |