/** * This method tests that an item is put in the collection. * * @dataProvider dataPutItem */ public function testPutItem(array $provided, array $expected) { //$this->markTestIncomplete(); $p0 = new IHashSet\Type(); foreach ($provided as $item) { $p0->putItem($item); } $p1 = $p0->size()->unbox(); $e1 = $expected[0]; $this->assertSame($e1, $p1); }
/** * This method returns a value as a boxed object. A value is typically a PHP typed * primitive or object. It is considered type-safe. * * @access public * @static * @param array $xs the value(s) to be boxed * @return IHashSet\Type the boxed object */ public static function make(array $xs) : IHashSet\Type { $zs = new IHashSet\Type(); foreach ($xs as $x) { $zs->putItem($x); } return $zs; }