Skip to content

Commit

Permalink
Add test for append()
Browse files Browse the repository at this point in the history
Attempt to reproduce #11226
  • Loading branch information
markstory committed Sep 22, 2017
1 parent 095e1a0 commit 0a9a0de
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/TestCase/Collection/CollectionTest.php
Expand Up @@ -1112,6 +1112,11 @@ public function testAppend()
$collection = new Collection(['a' => 1, 'b' => 2]);
$combined = $collection->append(['c' => 3, 'a' => 4]);
$this->assertEquals(['a' => 4, 'b' => 2, 'c' => 3], $combined->toArray());

$collection = new Collection([1, 2]);
$collection = $collection->append([3, 4]);
$combined = $collection->append([5, 6]);
$this->assertEquals([1, 2, 3, 4, 5, 6], $combined->toList());
}

/**
Expand Down

0 comments on commit 0a9a0de

Please sign in to comment.