| Conditions | 1 |
| Paths | 1 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php namespace Unit\Chekote\NounStore\Key; |
||
| 38 | public function testInvalidArgumentExceptionBubblesUpFromGetOrdinal() |
||
| 39 | { |
||
| 40 | $key = 'Thing'; |
||
| 41 | $index = -2; |
||
| 42 | $nth = $index + 1; |
||
| 43 | |||
| 44 | $exception = new InvalidArgumentException('$nth must be a positive number'); |
||
| 45 | |||
| 46 | /* @noinspection PhpUndefinedMethodInspection */ |
||
| 47 | Phake::expect($this->key, 1)->getOrdinal($nth)->thenThrow($exception); |
||
| 48 | |||
| 49 | $this->expectException(get_class($exception)); |
||
| 50 | $this->expectExceptionMessage($exception->getMessage()); |
||
| 51 | |||
| 52 | $this->key->build($key, $index); |
||
| 53 | } |
||
| 55 |