Example #1
0
 public function testUnsetOffsetRemovesGivenOffset()
 {
     $collection = new Collection();
     $collection->offsetSet(15, new stdClass());
     $collection->offsetUnset(15);
     $this->assertFalse($collection->offsetExists(15));
 }
Example #2
0
 public function testSetOffsetSetsGivenOffset()
 {
     $collection = new Collection();
     $collection->offsetSet(15, new stdClass());
     $this->assertInstanceOf('stdClass', $collection->offsetGet(15));
 }