blob: bd1345cc1105cd63d7d16c107c72371eaf754e67 (
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
68
69
70
71
|
<?php
/**
* PHPPgAdmin 6.0.0
*/
/**
* @internal
* @coversNothing
*/
class UserEntitiesTest extends \Codeception\Test\Unit
{
protected static $BASE_PATH;
protected $_container;
//const BASE_PATH = self::BASE_PATH;
/**
* @var \UnitTester
*/
protected $tester;
// tests
public function testGroupsView(): void
{
$_container = $this->container;
require self::$BASE_PATH . '/tests/views/groups.php';
$controller = groupsFactory($_container);
self::assertSame($controller->controller_name, 'GroupsController', 'controller name should be GroupsController');
}
public function testPrivilegesView(): void
{
$_container = $this->container;
require self::$BASE_PATH . '/tests/views/privileges.php';
$controller = privilegesFactory($_container);
self::assertSame($controller->controller_name, 'PrivilegesController', 'controller name should be PrivilegesController');
}
public function testRolesView(): void
{
$_container = $this->container;
require self::$BASE_PATH . '/tests/views/roles.php';
$controller = rolesFactory($_container);
self::assertSame($controller->controller_name, 'RolesController', 'controller name should be RolesController');
}
public function testUsersView(): void
{
$_container = $this->container;
require self::$BASE_PATH . '/tests/views/users.php';
$controller = usersFactory($_container);
self::assertSame($controller->controller_name, 'UsersController', 'controller name should be UsersController');
}
protected function _before(): void
{
$Helper = $this->getModule('\Helper\Unit');
$this->container = $Helper::getContainer();
self::$BASE_PATH = $Helper::BASE_PATH;
$this->container->get('misc')->setNoDBConnection(true);
// Helper
//\Codeception\Util\Debug::debug('BASE_PATH is ' . \BASE_PATH);
}
}
|