blob: 447192dd6ee1e7cd970fed95759232f25ca1f466 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
<?php
/**
* PHPPgAdmin 6.0.0
*/
namespace Helper;
\defined('IN_TEST') || \define('IN_TEST', true);
use PHPPgAdmin\ContainerUtils;
if (!\is_readable(ContainerUtils::BASE_PATH . '/src/lib.inc.php')) {
die('lib.inc.php is not readable');
}
\defined('IN_TEST') || \define('IN_TEST', true);
require_once ContainerUtils::BASE_PATH . '/src/lib.inc.php';
// 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();
}
//dump(PHP_SAPI);
//\Codeception\Util\Debug::debug('BASE_PATH is ' . \BASE_PATH);
return self::$_container;
}
}
|