| Conditions | 3 |
| Paths | 3 |
| Total Lines | 15 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | { |
||
| 31 | return $outcome->getType() == OutcomeInterface::TYPE_EXCEPTION; |
||
| 32 | } |
||
| 33 | |||
| 34 | public function handle(OutcomeInterface $outcome): Status |
||
| 35 | { |
||
| 36 | $thrownClass = $outcome->getPayload()['class'] ?? ''; |
||
| 37 | |||
| 38 | if ($thrownClass != $this->exceptionClass) { |
||
| 39 | return new Failure( |
||
| 40 | "Failed asserting that exception {$this->exceptionClass} was thrown, found: $thrownClass" |
||
| 41 | ); |
||
| 42 | } |
||
| 43 | |||
| 44 | return new Success("Asserted that exception {$this->exceptionClass} was thrown"); |
||
| 45 | } |
||
| 47 |