Exemple #1
0
 /**
  * @covers Fuel\Common\Arr::reverseFlatten
  * @group Common
  */
 public function testReverseFlatten()
 {
     $input = array('0_name' => 'Jack', '0_age' => 21, '1_name' => 'Jill', '1_age' => 23, 2 => 'new');
     $expected = array(array("name" => "Jack", "age" => 21), array("name" => "Jill", "age" => 23), 2 => 'new');
     $result = Arr::reverseFlatten($input, '_');
     $this->assertEquals($expected, $result);
 }