Example #1
0
 public function testOverwriteWithTraversable()
 {
     $c = new Collection(array('foo' => 1, 'baz' => 2, 'bar' => 3));
     $b = new Collection(array('foo' => 10, 'bar' => 300));
     $c->overwriteWith($b->getIterator());
     $this->assertEquals(array('foo' => 10, 'baz' => 2, 'bar' => 300), $c->getAll());
 }
 public function testOverridesSettings()
 {
     $c = new Collection(array('foo' => 1, 'baz' => 2, 'bar' => 3));
     $c->overwriteWith(array('foo' => 10, 'bar' => 300));
     $this->assertEquals(array('foo' => 10, 'baz' => 2, 'bar' => 300), $c->getAll());
 }