public function addAll(array $elements) : Set { $this->elements = self::sanitize(array_merge($this->elements, $elements)); return $this; }
public function testAdd() { $set = new Set(['B', 'A', 2, 1]); $set->addAll(['foo', 'bar']); $this->assertEquals(6, $set->cardinality()); }