Passed
Push — html ( 0d0c1d...bcd1cc )
by Peter
03:07
created

UrlFixerBootstrapperTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
c 1
b 0
f 0
dl 0
loc 25
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 5 1
A testRegisterBindings() 0 8 1
A tearDown() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace AbterPhp\Framework\Bootstrappers\Vendor;
6
7
use AbterPhp\Framework\Assets\UrlFixer;
8
use AbterPhp\Framework\Constant\Env;
9
use AbterPhp\Framework\Environments\Environment;
10
use Opulence\Ioc\Container;
11
use PHPUnit\Framework\TestCase;
12
13
class UrlFixerBootstrapperTest extends TestCase
14
{
15
    /** @var UrlFixerBootstrapper - System Under Test */
16
    protected UrlFixerBootstrapper $sut;
17
18
    public function setUp(): void
19
    {
20
        Environment::setVar(Env::MEDIA_BASE_URL, '?');
21
22
        $this->sut = new UrlFixerBootstrapper();
23
    }
24
25
    public function tearDown(): void
26
    {
27
        Environment::unsetVar(Env::MEDIA_BASE_URL);
28
    }
29
30
    public function testRegisterBindings(): void
31
    {
32
        $container = new Container();
33
34
        $this->sut->registerBindings($container);
35
36
        $actual = $container->resolve(UrlFixer::class);
37
        $this->assertInstanceOf(UrlFixer::class, $actual);
38
    }
39
}
40