public function doesNotEqualSetWithDifferentContents() { $other = new HashSet(); $this->set->add(new String('blue')); $other->add(new String('yellow')); $this->assertFalse($this->set->equals($other)); }
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); } }