Example #1
0
 /**
  * @dataProvider stringWithSeparatorProvider
  */
 public function testCreateFromString($string, $separator)
 {
     $array = explode($separator, $string);
     $ma = ImmutableArray::createFromString($string, $separator);
     $this->assertTrue($array === $ma->toArray());
 }
Example #2
0
 /**
  * @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);
 }