| Conditions | 1 |
| Paths | 1 |
| Total Lines | 21 |
| Code Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 37 | public function testForUnknownValue() |
||
| 38 | { |
||
| 39 | $this |
||
| 40 | ->given($cause = new \Exception('some cause')) |
||
| 41 | ->when($exception = InvalidMiddlewareException::forUnknownValue('foo', $cause)) |
||
| 42 | ->then |
||
| 43 | ->object($exception) |
||
| 44 | ->isInstanceOf(InvalidMiddlewareException::class) |
||
| 45 | ->integer($exception->getCode()) |
||
| 46 | ->isEqualTo(0) |
||
| 47 | ->object($exception->getPrevious()) |
||
| 48 | ->isIdenticalTo($cause) |
||
| 49 | ; |
||
| 50 | |||
| 51 | $this |
||
| 52 | ->given($exception = InvalidMiddlewareException::forUnknownValue('bar')) |
||
| 53 | ->then |
||
| 54 | ->variable($exception->getPrevious()) |
||
| 55 | ->isNull() |
||
| 56 | ; |
||
| 57 | } |
||
| 58 | } |
||
| 59 |