public function testWalkWithIngnoreLeaves() { $input = ['test' => 'omg', 'yes' => ['works?' => ['perhaps'], 'one' => 'day']]; Arr::walk($input, function ($key, $value, &$array, $path) { $array[$key] = 'huh'; }, true, '', false); $output = ['test' => 'huh', 'yes' => ['works?' => 'huh', 'one' => 'huh']]; $this->assertEquals($output, $input); }