Total Complexity | 5 |
Total Lines | 46 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
5 | trait InterfaceTest |
||
6 | { |
||
7 | // todo: add tests |
||
8 | |||
9 | /** @test */ |
||
10 | public function interface_exist() |
||
11 | { |
||
12 | $this->assertTrue(interface_exists($this->interface())); |
||
|
|||
13 | } |
||
14 | |||
15 | /** @test */ |
||
16 | public function interface_is_implemented() |
||
20 | } |
||
21 | } |
||
22 | |||
23 | /** @test */ |
||
24 | public function interface_methods_exist() |
||
28 | } |
||
29 | } |
||
30 | |||
31 | /** |
||
32 | * Retrieve the interface class that should be tested. |
||
33 | * |
||
34 | * @return string |
||
35 | */ |
||
36 | abstract public function interface(): string; |
||
37 | |||
38 | /** |
||
39 | * Retrieve an array of classes that should implement the interface. |
||
40 | * |
||
41 | * @return array |
||
42 | */ |
||
43 | abstract public function classes(): array; |
||
44 | |||
45 | /** |
||
46 | * Retrieve an array of method names that should exist in the interface. |
||
47 | * |
||
48 | * @return array |
||
49 | */ |
||
50 | abstract public function methods(): array; |
||
51 | } |
||
52 |