コード例 #1
0
ファイル: CollectionTest.php プロジェクト: alvarobfdev/applog
 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'));
 }