blob: 8dcabdbc48887e2257abee858c13cd376f94908c (
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
62
63
64
65
66
67
|
<?php
/**
* PHPPgAdmin v6.0.0-RC1.
*/
class ContainerTest extends \Codeception\Test\Unit
{
/**
* @var \UnitTester
*/
protected $tester;
protected $container;
protected function _before()
{
$Helper = $this->getModule('\Helper\Unit');
$this->container = $Helper->getContainer();
$this->container->misc->setNoDBConnection(true);
//\Codeception\Util\Debug::debug('BASE_PATH is ' . \BASE_PATH);
}
protected function _after()
{
}
public function testContainerValidity()
{
$utils = $this->container['utils'];
$this->assertTrue(
$this->container instanceof \Psr\Container\ContainerInterface,
'$container must be an instance of \Psr\Container\ContainerInterface'
);
}
public function testContainerUtils()
{
$utils = $this->container['utils'];
$this->assertTrue(
$this->container->utils instanceof \PHPPgAdmin\ContainerUtils,
'$container->utils must be an instance of PHPPgAdmin\ContainerUtils'
);
}
public function testContainerplugin_manager()
{
$this->assertTrue(
$this->container->plugin_manager instanceof \PHPPgAdmin\PluginManager,
'$container->plugin_manager must be an instance of nstanceof \PHPPgAdmin\PluginManager'
);
}
public function testContainermisc()
{
$this->assertTrue(
$this->container->misc instanceof \PHPPgAdmin\Misc,
'$container->misc must be an instance of \PHPPgAdmin\Misc'
);
}
public function testContainerview()
{
$this->assertTrue(
$this->container->view instanceof \Slim\Views\Twig,
'$container->view must be an instance of \Slim\Views\Twig'
);
}
}
|