Beispiel #1
0
 /**
  * @depends testOffsetSetOffsetGet
  */
 function testOffsetExists()
 {
     $map = new HashMap();
     $this->assertFalse($map->offsetExists(0));
     $map[0] = 1;
     $this->assertTrue($map->offsetExists(0));
     $this->assertFalse($map->offsetExists(1));
     $map[1] = 2;
     $this->assertTrue($map->offsetExists(0));
     $this->assertTrue($map->offsetExists(1));
     $this->assertFalse($map->offsetExists(-1));
 }