Ejemplo n.º 1
0
 /**
  * testParseArrayCamelCased
  *
  * Mobile team send us files with camel cased keys - on some project. So butcher them
  *
  * @return void
  */
 public function testParseArrayCamelCased()
 {
     $data = array('camelCasedKey' => 'bar');
     $settings = array('locale' => 'en', 'domain' => 'default', 'category' => 'LC_MESSAGES');
     $expected = array('count' => 1, 'translations' => array(array('locale' => 'en', 'domain' => 'default', 'category' => 'LC_MESSAGES', 'key' => 'camel.cased.key', 'value' => 'bar')));
     $result = TestParser::parseArray($data, $settings);
     $this->assertSame($expected, $result, 'camel cased keys are expected to be converted to dot delimited');
 }