DTOPluginTest::testPlugin()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 6
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 10
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 *  This file is part of the Micro framework package.
7
 *
8
 *  (c) Stanislau Komar <[email protected]>
9
 *
10
 *  For the full copyright and license information, please view the LICENSE
11
 *  file that was distributed with this source code.
12
 */
13
14
namespace Micro\Plugin\DTO\Test\Unit;
15
16
use Micro\Kernel\App\AppKernel;
17
use Micro\Library\DTO\SerializerFacadeInterface;
18
use Micro\Library\DTO\ValidatorFacadeInterface;
19
use Micro\Plugin\DTO\DTOPlugin;
20
use Micro\Plugin\DTO\Facade\DTOFacadeInterface;
21
use PHPUnit\Framework\TestCase;
22
23
class DTOPluginTest extends TestCase
24
{
25
    public function testPlugin(): void
26
    {
27
        $kernel = new AppKernel([], [
28
            DTOPlugin::class,
29
        ]);
30
31
        $kernel->run();
32
        $this->assertInstanceOf(DTOFacadeInterface::class, $kernel->container()->get(DTOFacadeInterface::class));
33
        $this->assertInstanceOf(SerializerFacadeInterface::class, $kernel->container()->get(SerializerFacadeInterface::class));
34
        $this->assertInstanceOf(ValidatorFacadeInterface::class, $kernel->container()->get(ValidatorFacadeInterface::class));
35
    }
36
}
37