Esempio n. 1
0
 /**
  * This method tests the "headOption" method.
  *
  * @dataProvider data_headOption
  */
 public function test_headOption(array $provided, array $expected)
 {
     $p0 = IArrayList\Type::make($provided[0], '\\Saber\\Data\\IInt32\\Type');
     $r0 = IArrayList\Module::headOption($p0);
     $e0 = $expected[0];
     if ($e0 !== null) {
         $this->assertInstanceOf('\\Saber\\Data\\IOption\\Some\\Type', $r0);
         $v0 = $r0->unbox();
         $this->assertInstanceOf('\\Saber\\Data\\IInt32\\Type', $v0);
         $this->assertSame($e0, $v0->unbox());
     } else {
         $this->assertInstanceOf('\\Saber\\Data\\IOption\\None\\Type', $r0);
     }
 }