diff options
Diffstat (limited to 'tests/_support/Helper/Unit.php')
-rw-r--r-- | tests/_support/Helper/Unit.php | 28 |
1 files changed, 5 insertions, 23 deletions
diff --git a/tests/_support/Helper/Unit.php b/tests/_support/Helper/Unit.php index 447192dd..abb182cc 100644 --- a/tests/_support/Helper/Unit.php +++ b/tests/_support/Helper/Unit.php @@ -7,49 +7,31 @@ 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 */ private static $_container; 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); |