Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | protected function verifyContract(string $eventClass, string $contract): bool |
||
13 | { |
||
14 | $data = $this->getInboundEvent($contract); |
||
15 | |||
16 | try { |
||
17 | new $eventClass($data); |
||
18 | } catch (\Exception $e) { |
||
19 | $this->fail(sprintf("Event Class %s cannot be constructed with the Contract Data '%s': %s", $eventClass, $contract, $e->getMessage())); |
||
20 | } |
||
21 | return true; |
||
22 | } |
||
25 | } |