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

ContainerTest.php « Unit « tests - github.com/HuasoFoundries/phpPgAdmin6.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c23af32745aa2ac2469c76a1a7258dbd6b3a27e8 (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
<?php

/**
 * PHPPgAdmin6
 */

namespace Tests\Unit;

use PHPPgAdmin\ContainerUtils;
use PHPPgAdmin\Misc;
use Psr\Container\ContainerInterface;
use Slim\Views\Twig;

beforeEach(function () {
    $this->container = containerInstance();
    $this->container->get('misc')->setNoDBConnection(true);
});

    it('Ensures container is instance of Slim ContainerInterface', function () {
        expect($this->container)->toBeInstanceOf(ContainerInterface::class);
    });

    it('Ensures container is instance of ContainerUtils', function () {
        expect($this->container)->toBeInstanceOf(ContainerUtils::class);
    });

    it('Ensures container->misc is instance of PHPPgAdmin\Misc', function () {
        expect($this->container->misc)->toBeInstanceOf(Misc::class);
    });

    it('Ensures container->view is an instance of Slim\Views\Twig', function () {
        expect($this->container->view)->toBeInstanceOf(Twig::class);
    });