/** * UtilityTest::testArrayFlattenAndPreserveKeys() * * @covers ::arrayFlatten * @return void */ public function testArrayFlattenAndPreserveKeys() { $array = [0 => 1, 1 => ['c' => ['d' => ['g', 'h' => true]]], 2 => 'm']; $res = Utility::arrayFlatten($array, true); $expected = [0 => 'g', 'h' => true, 2 => 'm']; $this->assertSame($expected, $res); }