/** * This method tests the "isPair" method. * * @dataProvider data_isPair */ public function test_isPair(array $provided, array $expected) { $p0 = ITuple\Module::isPair(ITuple\Type::make($provided[0])); $e0 = $expected[0]; $this->assertInstanceOf('\\Saber\\Data\\IBool\\Type', $p0); $this->assertSame($e0, $p0->unbox()); }
/** * This method returns a value as a boxed object. A value is typically a PHP typed * array. It is considered type-safe. * * @access public * @static * @param mixed ...$xs the value(s) to be boxed * @return ITuple\Type the boxed object * @throws Throwable\InvalidArgument\Exception indicates an invalid argument */ public static function make2(...$xs) : ITuple\Type { return ITuple\Type::make($xs); }
/** * This method tests the "toString" method. * * @dataProvider data_toString */ public function test_toString(array $provided, array $expected) { $this->markTestIncomplete(); $p0 = ITuple\Type::make($provided[0])->toString(); $e0 = $expected[0]; $this->assertInstanceOf('\\Saber\\Data\\IString\\Type', $p0); $this->assertSame($e0, $p0->unbox()); }