| Total Complexity | 5 |
| Total Lines | 40 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | class LazyMiddlewareTest extends TestCase |
||
| 15 | { |
||
| 16 | /** @var ContainerInterface */ |
||
| 17 | private $container; |
||
| 18 | |||
| 19 | public function setUp() |
||
| 20 | { |
||
| 21 | $this->container = new class implements ContainerInterface |
||
| 22 | { |
||
| 23 | public function has($id) |
||
| 26 | } |
||
| 27 | |||
| 28 | public function get($id) |
||
| 29 | { |
||
| 30 | return new $id(); |
||
| 31 | } |
||
| 32 | }; |
||
| 33 | } |
||
| 34 | |||
| 35 | public function testVerifiesMiddlewareImplementation(): void |
||
| 36 | { |
||
| 37 | $this->expectException(InvalidArgumentException::class); |
||
| 38 | $this->expectExceptionMessage(self::class); |
||
| 39 | |||
| 40 | $middleware = new LazyMiddleware($this->container, self::class); |
||
|
|
|||
| 41 | } |
||
| 42 | |||
| 43 | public function testDefersToMiddlewareImplemention(): void |
||
| 54 | } |
||
| 55 | } |
||
| 56 |