Esempio n. 1
0
 public function test_offset()
 {
     $arc = new ArrayCollection(array('aap', 'aap', 'noot', 'mies'));
     $this->assertTrue($arc->offsetExists(0));
     $this->assertTrue($arc->offsetExists(1));
     $this->assertFalse($arc->offsetExists(4));
     $this->assertEquals($arc->offsetGet(0), 'aap');
     $this->assertEquals($arc->offsetGet(2), 'noot');
     $arc->offsetSet(2, 'zus');
     $this->assertEquals($arc->offsetGet(2), 'zus');
     $arc->offsetUnset(0);
     $this->assertFalse($arc->offsetExists(0));
     $this->assertTrue($arc->offsetExists(1));
 }
Esempio n. 2
0
 /** {@inheritDoc} */
 public function offsetExists($offset)
 {
     $this->initialize();
     return $this->collection->offsetExists($offset);
 }