AssertTestCase   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

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

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 Phake\IMock;
7
use Unit\Chekote\NounStore\Store\StorePhake;
8
use Unit\Chekote\NounStore\TestCase;
9
use Unit\Chekote\Phake\Phake;
10
11
abstract class AssertTestCase extends TestCase
12
{
13
    protected IMock|AssertPhake $assert;
14
15
    protected IMock|StorePhake $store;
16
17
    protected IMock|KeyPhake $key;
18
19
    /**
20
     * Sets up the environment before each test.
21
     */
22
    public function setUp(): void
23
    {
24
        $this->key = Phake::strictMock(Key::class);
25
        $this->store = Phake::strictMockWithConstructor(Store::class, $this->key);
26
        $this->assert = Phake::strictMockWithConstructor(Assert::class, $this->store, $this->key);
27
    }
28
29
    /**
30
     * Tears down the environment after each test.
31
     */
32
    public function tearDown(): void
33
    {
34
        unset($this->assert);
35
        unset($this->key);
36
        unset($this->store);
37
    }
38
}
39