| Conditions | 1 |
| Paths | 1 |
| Total Lines | 17 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php namespace Chekote\NounStore\Key; |
||
| 41 | public function testInvalidArgumentExceptionBubblesUpFromGetOrdinal() |
||
| 42 | { |
||
| 43 | $key = 'Thing'; |
||
| 44 | $index = -2; |
||
| 45 | $nth = $index + 1; |
||
| 46 | |||
| 47 | $exception = new InvalidArgumentException('$nth must be a positive number'); |
||
| 48 | |||
| 49 | /* @noinspection PhpUndefinedMethodInspection */ |
||
| 50 | Phake::when($this->key)->getOrdinal($nth)->thenThrow($exception); |
||
| 51 | |||
| 52 | $this->assertException($exception, function () use ($key, $index) { |
||
| 53 | $this->key->build($key, $index); |
||
| 54 | }); |
||
| 55 | |||
| 56 | /* @noinspection PhpUndefinedMethodInspection */ |
||
| 57 | Phake::verify($this->key)->getOrdinal($nth); |
||
| 58 | } |
||
| 60 |