コード例 #1
0
ファイル: ModuleTest.php プロジェクト: bluesnowman/fphp-saber
 /**
  * This method tests the "sequence" method.
  *
  * @dataProvider data_sequence
  */
 public function test_sequence(array $provided, array $expected)
 {
     $this->markTestIncomplete();
     if (is_array($provided[1])) {
         $p0 = IDouble\Module::sequence(IDouble\Type::box($provided[0]), ITuple\Type::box(array_map(function (int $item) : IDouble\Type {
             return IDouble\Type::box($item);
         }, $provided[1])));
         $e0 = $expected[0];
     } else {
         $p0 = IDouble\Module::sequence(IDouble\Type::box($provided[0]), IDouble\Type::box($provided[1]));
         $e0 = $expected[0];
     }
     $this->assertInstanceOf('\\Saber\\Data\\IArrayList\\Type', $p0);
     $this->assertEquals($e0, $p0->unbox(1));
 }