Conditions | 5 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
15 | public function createExpectation(Annotation $annotation): ?ExpectationInterface |
||
16 | { |
||
17 | if ($annotation->isNamed(Annotations::ANNOTATION_EXPECT_OUTPUT)) { |
||
18 | return new OutputExpectation(new Regexp($annotation->getArgument() ?: '//')); |
||
19 | } |
||
20 | |||
21 | if ($annotation->isNamed(Annotations::ANNOTATION_EXPECT_ERROR)) { |
||
22 | return new ErrorExpectation(new Regexp($annotation->getArgument() ?: '//')); |
||
23 | } |
||
24 | |||
25 | return null; |
||
26 | } |
||
28 |