public function testBasicOffsetUnset() { $key = 'test'; $value = uniqid($key . ':'); $a = [$key => $value]; $o = new ArrayModel($a); $this->assertEquals($value, $o[$key]); $o->offsetUnset($key); $this->assertNull($o[$key]); }
public function testOffsetExistsWithAndWithoutCorrectKey() { $key = 'test'; $value = uniqid($key . ':'); $a = [$key => $value]; $o = new ArrayModel($a); $this->assertTrue($o->offsetExists($key)); $this->assertFalse($o->offsetExists(uniqid())); $o->offsetUnset($key); $this->assertFalse($o->offsetExists($key)); }