| Total Complexity | 5 |
| Total Lines | 33 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | class ExceptionExpectation implements ExpectationInterface |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var string Name of expected exception class |
||
| 16 | */ |
||
| 17 | private $exceptionClass; |
||
| 18 | |||
| 19 | public function __construct(string $exceptionClass) |
||
| 20 | { |
||
| 21 | $this->exceptionClass = $exceptionClass; |
||
| 22 | } |
||
| 23 | |||
| 24 | public function __tostring(): string |
||
| 25 | { |
||
| 26 | return "expecting an exception of class {$this->exceptionClass} to be thrown"; |
||
| 27 | } |
||
| 28 | |||
| 29 | public function handles(OutcomeInterface $outcome): bool |
||
| 32 | } |
||
| 33 | |||
| 34 | public function handle(OutcomeInterface $outcome): Status |
||
| 45 | } |
||
| 46 | } |
||
| 47 |