/** * This method tests the "sequence" method. * * @dataProvider data_sequence */ public function test_sequence(array $provided, array $expected) { if (is_array($provided[1])) { $p0 = IInt32\Module::sequence(IInt32\Type::box($provided[0]), ITuple\Type::box(array_map(function (int $item) : IInt32\Type { return IInt32\Type::box($item); }, $provided[1]))); $e0 = $expected[0]; } else { $p0 = IInt32\Module::sequence(IInt32\Type::box($provided[0]), IInt32\Type::box($provided[1])); $e0 = $expected[0]; } $this->assertInstanceOf('\\Saber\\Data\\IArrayList\\Type', $p0); $this->assertEquals($e0, $p0->unbox(1)); }