We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3a0ad1a commit abf0659Copy full SHA for abf0659
tests/Support/SupportCollectionTest.php
@@ -3684,13 +3684,21 @@ public function testPullRetrievesItemFromCollection()
3684
$c = new Collection(['foo', 'bar']);
3685
3686
$this->assertSame('foo', $c->pull(0));
3687
+ $this->assertSame('bar', $c->pull(1));
3688
+
3689
+ $c = new Collection(['foo', 'bar']);
3690
3691
+ $this->assertNull($c->pull(-1));
3692
+ $this->assertNull($c->pull(2));
3693
}
3694
3695
public function testPullRemovesItemFromCollection()
3696
{
3697
3698
$c->pull(0);
3699
$this->assertEquals([1 => 'bar'], $c->all());
3700
+ $c->pull(1);
3701
+ $this->assertEquals([], $c->all());
3702
3703
3704
public function testPullRemovesItemFromNestedCollection()
0 commit comments