Passed
Push — phpstorm_php ( 759894...3a8c25 )
by Donald
03:03
created

AssertTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 5 1
A tearDown() 0 5 1
1
<?php namespace Chekote\NounStore\Assert;
2
3
use Chekote\NounStore\Assert;
4
use Chekote\NounStore\Key;
5
use Chekote\NounStore\Store;
6
use Chekote\NounStore\TestCase;
7
use 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