public function testParsePluralized()
 {
     $xml = '<response><foo>bar</foo></response>';
     $rules = array('foo' => 'foos');
     $expected = new \stdClass();
     $expected->foos = array('bar');
     $this->assertEquals($expected, $this->xmlParser->parse($xml, $rules));
 }
 /**
  * Parses & normalizes an XML geocoding result response.
  *
  * @param string $response The response.
  *
  * @return \stdClass The parsed & normalized response.
  */
 protected function parseXML($response)
 {
     $rules = array('address_component' => 'address_components', 'type' => 'types', 'result' => 'results');
     return $this->xmlParser->parse($response, $rules);
 }