示例#1
0
 public function testImplementsArrayAccess()
 {
     $this->coll->merge(array('k1' => 'v1', 'k2' => 'v2'));
     $this->assertTrue($this->coll->offsetExists('k1'));
     $this->assertFalse($this->coll->offsetExists('Krull'));
     $this->coll->offsetSet('k3', 'v3');
     $this->assertEquals('v3', $this->coll->offsetGet('k3'));
     $this->assertEquals('v3', $this->coll->get('k3'));
     $this->coll->offsetUnset('k1');
     $this->assertFalse($this->coll->offsetExists('k1'));
 }