| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 46 | public function testCapture() |
||
| 47 | { |
||
| 48 | $regexp = RegExp::of('/(?<i>\d)/'); |
||
| 49 | |||
| 50 | $map = $regexp->capture(Str::of('foo123bar')); |
||
| 51 | |||
| 52 | $this->assertInstanceOf(Map::class, $map); |
||
| 53 | $this->assertSame('scalar', $map->keyType()); |
||
| 54 | $this->assertSame(Str::class, $map->valueType()); |
||
| 55 | $this->assertSame('1', $map->get('i')->toString()); |
||
| 56 | } |
||
| 58 |