Passed
Push — php8 ( bb7e6a...5527ec )
by Donald
01:50
created

AssertTestCase   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 29
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A tearDown() 0 5 1
A setUp() 0 5 1
1
<?php namespace Unit\Chekote\NounStore\Assert;
2
3
use Chekote\NounStore\Assert;
4
use Chekote\NounStore\Key;
5
use Chekote\NounStore\Store;
6
use Unit\Chekote\NounStore\TestCase;
7
use Unit\Chekote\Phake\Phake;
8
9
abstract class AssertTestCase extends TestCase
10
{
11
    /** @var AssertPhake */
12
    protected $assert;
13
14
    /** @var StorePhake */
15
    protected $store;
16
17
    /** @var KeyPhake */
18
    protected $key;
19
20
    /**
21
     * Sets up the environment before each test.
22
     */
23
    public function setUp(): void
24
    {
25
        $this->key = Phake::strictMock(Key::class);
26
        $this->store = Phake::strictMockWithConstructor(Store::class, $this->key);
27
        $this->assert = Phake::strictMockWithConstructor(Assert::class, $this->store, $this->key);
28
    }
29
30
    /**
31
     * Tears down the environment after each test.
32
     */
33
    public function tearDown(): void
34
    {
35
        $this->assert = null;
36
        $this->key = null;
37
        $this->store = null;
38
    }
39
}
40