AssertTestCase::tearDown()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 0
dl 0
loc 5
rs 10
c 0
b 0
f 0
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