Example #1
0
 /**
  * Check that you can delete an item from the arraycollection based on key.
  */
 public function testOffsetUnset()
 {
     $this->_arrayCollection = new Messaging\ArrayCollection($this->_data);
     $data = array('foo' => 'foo1', 'bar' => 'bar1');
     $this->assertEquals($data, $this->_arrayCollection->offsetGet(0));
     $this->assertEquals(2, count($this->_arrayCollection));
     $this->_arrayCollection->offsetUnset(0);
     $this->assertEquals(1, count($this->_arrayCollection));
 }