示例#1
0
 /**
  * This method tests the boxing of a value.
  *
  * @dataProvider data_box
  */
 public function test_box(array $provided, array $expected)
 {
     //$this->markTestIncomplete();
     $p0 = IHashMap\Type::box($provided);
     $this->assertInstanceOf('\\Saber\\Data\\IHashMap\\Type', $p0);
     $p1 = $p0->unbox();
     $e1 = $expected[0];
     $this->assertInternalType('array', $p1);
     $this->assertCount($e1, $p1);
 }
示例#2
0
 /**
  * This method returns an item after removing it from the hash map.
  *
  * @access public
  * @static
  * @param IHashMap\Type $xs                                 the hash map
  * @param Core\Type $k                                      the key associated with the
  *                                                          item to be removed
  * @return Core\Type                                        the item removed
  */
 public static function removeKey(IHashMap\Type $xs, Core\Type $k) : Core\Type
 {
     $zs = IHashMap\Type::box($xs->unbox());
     $zs->removeKey($k);
     return $zs;
 }