Conditions | 7 |
Paths | 12 |
Total Lines | 19 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
17 | public function createExpectation($name, array $args) |
||
18 | { |
||
19 | if (empty($args)) { |
||
20 | $args[] = ''; |
||
21 | } |
||
22 | |||
23 | switch (strtolower($name)) { |
||
24 | case 'expectexception': |
||
25 | return new ExceptionExpectation($args[0]); |
||
26 | case 'expectoutput': |
||
27 | return new OutputExpectation(new Regexp($args[0])); |
||
28 | case 'expectreturntype': |
||
29 | return new ReturnTypeExpectation($args[0]); |
||
30 | case 'expectreturn': |
||
31 | return new ReturnExpectation(new Regexp($args[0])); |
||
32 | case 'expectnothing': |
||
33 | return new NullExpectation; |
||
34 | } |
||
35 | } |
||
36 | } |
||
37 |