Total Complexity | 4 |
Total Lines | 37 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
13 | final class TestEnvelope |
||
14 | { |
||
15 | private Envelope $envelope; |
||
16 | |||
17 | public function __construct(Envelope $envelope) |
||
20 | } |
||
21 | |||
22 | /** |
||
23 | * @param mixed[] $arguments |
||
24 | * |
||
25 | * @return mixed |
||
26 | */ |
||
27 | public function __call(string $name, array $arguments) |
||
28 | { |
||
29 | return $this->envelope->{$name}(...$arguments); |
||
30 | } |
||
31 | |||
32 | public function assertHasStamp(string $class): self |
||
33 | { |
||
34 | Assert::that($this->envelope->all($class))->isNotEmpty( |
||
35 | 'Expected to find stamp "{stamp}" but did not.', |
||
36 | ['stamp' => $class] |
||
37 | ); |
||
38 | |||
39 | return $this; |
||
40 | } |
||
41 | |||
42 | public function assertNotHasStamp(string $class): self |
||
50 | } |
||
51 | } |
||
52 |