public function hashSetUsableInForeach() { $s = new HashSet(); $s->addAll(array(new String('0'), new String('1'), new String('2'))); foreach ($s as $i => $element) { $this->assertEquals(new String($i), $element); } }
public function hashSetUsableInForeach() { $s = new HashSet(); $s->addAll([new Name('0'), new Name('1'), new Name('2')]); foreach ($s as $i => $element) { $this->assertEquals(new Name($i), $element); } }