Total Complexity | 5 |
Total Lines | 36 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
12 | class ErrorExpectation implements ExpectationInterface |
||
13 | { |
||
14 | /** |
||
15 | * @var Regexp Expression matching error |
||
16 | */ |
||
17 | private $regexp; |
||
18 | |||
19 | /** |
||
20 | * Set regular expression matching error |
||
21 | */ |
||
22 | public function __construct(Regexp $regexp) |
||
23 | { |
||
24 | $this->regexp = $regexp; |
||
25 | } |
||
26 | |||
27 | public function __tostring(): string |
||
28 | { |
||
29 | return "expecting error to match regexp {$this->regexp}"; |
||
30 | } |
||
31 | |||
32 | public function handles(OutcomeInterface $outcome): bool |
||
35 | } |
||
36 | |||
37 | public function handle(OutcomeInterface $outcome): Status |
||
48 | } |
||
49 | } |
||
50 |