public static function optionsToCamelCase(array $options) { $optionsByName = array(); if (count($options)) { foreach ($options as $name => $value) { $optionsByName[Util::snakeToCamelCase($name)] = $value; } } return $optionsByName; }
public function testOptionsToCamelCase() { $array = array('hello_there' => 'Hello', 'bye_bye' => 'Bye'); $this->assertEquals(array('helloThere' => 'Hello', 'byeBye' => 'Bye'), ClassLoader::optionsToCamelCase($array)); }