Welcome to mirror list, hosted at ThFree Co, Russian Federation.

ViewTest.php « unit « tests - github.com/HuasoFoundries/phpPgAdmin6.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 77a473b9947b7f4299a2dbade4c7c2f040565267 (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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
<?php

/**
 * PHPPgAdmin 6.0.0
 */

/**
 * @internal
 * @coversNothing
 */
class ViewTest extends \Codeception\Test\Unit
{
    protected static $BASE_PATH;

    protected $_container;

    /**
     * @var \UnitTester
     */
    protected $tester;

    // tests

    public function testAcinsertView(): void
    {
        $_container = $this->container;

        require self::$BASE_PATH . '/tests/views/acinsert.php';
        $controller = acinsertFactory($_container);
        self::assertSame($controller->controller_name, 'AcinsertController', 'controller name should be AcinsertController');
    }

    public function testAggregatesView(): void
    {
        $_container = $this->container;

        require self::$BASE_PATH . '/tests/views/aggregates.php';
        $controller = aggregatesFactory($_container);
        self::assertSame($controller->controller_name, 'AggregatesController', 'controller name should be AggregatesController');
    }

    public function testCastsView(): void
    {
        $_container = $this->container;

        require self::$BASE_PATH . '/tests/views/casts.php';
        $controller = castsFactory($_container);
        self::assertSame($controller->controller_name, 'CastsController', 'controller name should be CastsController');
    }

    public function testColpropertiesView(): void
    {
        $_container = $this->container;

        require self::$BASE_PATH . '/tests/views/colproperties.php';
        $controller = colpropertiesFactory($_container);
        self::assertSame($controller->controller_name, 'ColpropertiesController', 'controller name should be ColpropertiesController');
    }

    public function testConstraintsView(): void
    {
        $_container = $this->container;

        require self::$BASE_PATH . '/tests/views/constraints.php';
        $controller = constraintsFactory($_container);
        self::assertSame($controller->controller_name, 'ConstraintsController', 'controller name should be ConstraintsController');
    }

    public function testConversionsView(): void
    {
        $_container = $this->container;

        require self::$BASE_PATH . '/tests/views/conversions.php';
        $controller = conversionsFactory($_container);
        self::assertSame($controller->controller_name, 'ConversionsController', 'controller name should be ConversionsController');
    }

    public function testDomainsView(): void
    {
        $_container = $this->container;

        require self::$BASE_PATH . '/tests/views/domains.php';
        $controller = domainsFactory($_container);
        self::assertSame($controller->controller_name, 'DomainsController', 'controller name should be DomainsController');
    }

    public function testFulltextView(): void
    {
        $_container = $this->container;

        require self::$BASE_PATH . '/tests/views/fulltext.php';
        $controller = fulltextFactory($_container);
        self::assertSame($controller->controller_name, 'FulltextController', 'controller name should be FulltextController');
    }

    public function testFunctionsView(): void
    {
        $_container = $this->container;

        require self::$BASE_PATH . '/tests/views/functions.php';
        $controller = functionsFactory($_container);
        self::assertSame($controller->controller_name, 'FunctionsController', 'controller name should be FunctionsController');
    }

    public function testIndexesView(): void
    {
        $_container = $this->container;

        require self::$BASE_PATH . '/tests/views/indexes.php';
        $controller = indexesFactory($_container);
        self::assertSame($controller->controller_name, 'IndexesController', 'controller name should be IndexesController');
    }

    public function testLanguagesView(): void
    {
        $_container = $this->container;

        require self::$BASE_PATH . '/tests/views/languages.php';
        $controller = languagesFactory($_container);
        self::assertSame($controller->controller_name, 'LanguagesController', 'controller name should be LanguagesController');
    }

    public function testOpclassesView(): void
    {
        $_container = $this->container;

        require self::$BASE_PATH . '/tests/views/opclasses.php';
        $controller = opclassesFactory($_container);
        self::assertSame($controller->controller_name, 'OpclassesController', 'controller name should be OpclassesController');
    }

    public function testOperatorsView(): void
    {
        $_container = $this->container;

        require self::$BASE_PATH . '/tests/views/operators.php';
        $controller = operatorsFactory($_container);
        self::assertSame($controller->controller_name, 'OperatorsController', 'controller name should be OperatorsController');
    }

    public function testRulesView(): void
    {
        $_container = $this->container;

        require self::$BASE_PATH . '/tests/views/rules.php';
        $controller = rulesFactory($_container);
        self::assertSame($controller->controller_name, 'RulesController', 'controller name should be RulesController');
    }

    public function testSequencesView(): void
    {
        $_container = $this->container;

        require self::$BASE_PATH . '/tests/views/sequences.php';
        $controller = sequencesFactory($_container);
        self::assertSame($controller->controller_name, 'SequencesController', 'controller name should be SequencesController');
    }

    public function testTriggersView(): void
    {
        $_container = $this->container;

        require self::$BASE_PATH . '/tests/views/triggers.php';
        $controller = triggersFactory($_container);
        self::assertSame($controller->controller_name, 'TriggersController', 'controller name should be TriggersController');
    }

    public function testTypesView(): void
    {
        $_container = $this->container;

        require self::$BASE_PATH . '/tests/views/types.php';
        $controller = typesFactory($_container);
        self::assertSame($controller->controller_name, 'TypesController', 'controller name should be TypesController');
    }

    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);
    }
}