Failed Conditions
Push — complex_graph_v3 ( 6aae2b )
by Donald
02:29
created

AssertTest::setUp()   A

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