Failed Conditions
Push — php8_squashed ( f1918e )
by Donald
03:22 queued 17s
created

KeyTestCase   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 3 1
A tearDown() 0 5 1
1
<?php namespace Unit\Chekote\NounStore\Key;
2
3
use Chekote\NounStore\Key;
4
use Phake\IMock;
5
use Unit\Chekote\NounStore\Assert\KeyPhake;
6
use Unit\Chekote\NounStore\TestCase;
7
use Unit\Chekote\Phake\Phake;
8
9
abstract class KeyTestCase extends TestCase
10
{
11
    const INVALID_KEY = "It's's invalid because of the double apostrophe";
12
13
    protected IMock|KeyPhake|null $key;
14
15
    /**
16
     * Sets up the environment before each test.
17
     */
18
    public function setUp(): void
19
    {
20
        $this->key = Phake::strictMock(Key::class);
21
    }
22
23
    /**
24
     * Tears down the environment after each test.
25
     */
26
    public function tearDown(): void
27
    {
28
        $this->key = null;
29
30
        Phake::verifyExpectations();
31
    }
32
}
33