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

DataEntitiesTest.php « unit « tests - github.com/HuasoFoundries/phpPgAdmin6.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: dcc3df95af8a2432363db2a232c288ab68d87681 (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.1.2
 */

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

    protected $_container;

    //const BASE_PATH = self::BASE_PATH;

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

    // tests

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

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

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

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

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

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

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

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

    protected function _before(): void
    {
        $Helper = $this->getModule('\Helper\Unit');
        $this->container = $Helper::getContainer();
        self::$BASE_PATH = self::$BASE_PATH = $this->container->BASE_PATH;
        $this->container->get('misc')->setNoDBConnection(true);
        // Helper
        // \Codeception\Util\Debug::debug('BASE_PATH is ' . \BASE_PATH);
    }
}