| Conditions | 1 |
| Paths | 1 |
| Total Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | public function testExceptionForContainerValues($value, string $expectedType) : void |
||
| 30 | { |
||
| 31 | $filename = uniqid('filename', true); |
||
| 32 | |||
| 33 | $exception = NotAPsrContainer::fromAnythingButAPsrContainer($filename, $value); |
||
| 34 | |||
| 35 | self::assertInstanceOf(NotAPsrContainer::class, $exception); |
||
| 36 | self::assertInstanceOf(\RuntimeException::class, $exception); |
||
| 37 | self::assertSame( |
||
| 38 | sprintf( |
||
| 39 | 'File %s must return a PSR-11 container, actually returned %s', |
||
| 40 | $filename, |
||
| 41 | $expectedType |
||
| 42 | ), |
||
| 43 | $exception->getMessage() |
||
| 44 | ); |
||
| 45 | } |
||
| 46 | } |
||
| 47 |