AbstractTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
wmc 2
eloc 8
c 1
b 1
f 0
dl 0
loc 21
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A tearDown() 0 5 1
A setUp() 0 5 1
1
<?php
2
3
namespace Nip\Container\Tests;
4
5
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
6
use Nip\Container\Container;
7
use PHPUnit\Framework\TestCase;
8
9
/**
10
 * Class AbstractTest
11
 */
12
abstract class AbstractTest extends TestCase
13
{
14
    use MockeryPHPUnitIntegration;
15
16
    protected $object;
17
18
    protected function setUp(): void
19
    {
20
        parent::setUp();
21
        \Nip\Container\Container::setInstance(new Container());
22
        \Nip\Utility\Container::container(true);
23
    }
24
25
    /**
26
     * This method is called after each test.
27
     */
28
    protected function tearDown(): void
29
    {
30
        parent::tearDown();
31
32
        \Mockery::close();
33
    }
34
}
35