/**
* Tests the `ArrayAccess` interface implementation for manipulating values by direct offsets.
*
* @return void
*/
public function testArrayAccessOffsetMethods()
{
$collection = new Collection(array('data' => array('foo', 'bar', 'baz' => 'dib')));
$this->assertTrue($collection->offsetExists(0));
$this->assertTrue($collection->offsetExists(1));
$this->assertTrue($collection->offsetExists('0'));
$this->assertTrue($collection->offsetExists('baz'));
$this->assertFalse($collection->offsetExists('2'));
$this->assertFalse($collection->offsetExists('bar'));
$this->assertFalse($collection->offsetExists(2));
$this->assertEqual('foo', $collection->offsetSet('bar', 'foo'));
$this->assertTrue($collection->offsetExists('bar'));
$this->assertNull($collection->offsetUnset('bar'));
$this->assertFalse($collection->offsetExists('bar'));
}