/** * @dataProvider stringWithSeparatorProvider */ public function testCreateFromString($string, $separator) { $array = explode($separator, $string); $ma = ImmutableArray::createFromString($string, $separator); $this->assertTrue($array === $ma->toArray()); }
/** * @dataProvider stringWithSeparatorProvider * * @param string $string * @param string $separator */ public function testStaticCreateFromString($string, $separator) { $array = explode($separator, $string); $arrayzy = A::create($array); $resultArrayzy = A::createFromString($string, $separator); $this->assertImmutable($arrayzy, $resultArrayzy, $array, $array); }