Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | public function test_unshift() |
||
16 | { |
||
17 | $collection = new Collection(); |
||
18 | |||
19 | $collection->unshift(1); |
||
20 | self::assertSame(1, $collection->first()); |
||
21 | |||
22 | $collection->unshift(2); |
||
23 | self::assertSame(2, $collection->first()); |
||
24 | |||
25 | $collection->unshift(3,99); |
||
26 | self::assertSame(3, $collection->first()); |
||
27 | self::assertSame(99, Arr::first($collection->keys())); |
||
28 | } |
||
29 | } |