/** * @see ResponseParser::parseGeoArray */ public function test_parseGeoArray() { $geodata = [["Palermo", "190.4424", ["13.361389338970184", "38.115556395496299"]], ["Catania", "56.4413", ["15.087267458438873", "37.50266842333162"]]]; $result = ResponseParser::parseGeoArray($geodata); $this->assertSame(2, count($result)); $this->assertSame(["190.4424", ["13.361389338970184", "38.115556395496299"]], $result['Palermo']); $this->assertSame(["56.4413", ["15.087267458438873", "37.50266842333162"]], $result['Catania']); $this->assertSame([], ResponseParser::parseGeoArray([])); $geodata = [["Palermo", "190.4424"], ["Catania", "56.4413"]]; $result = ResponseParser::parseGeoArray($geodata); $this->assertSame(2, count($result)); $this->assertSame(["190.4424"], $result['Palermo']); $this->assertSame(["56.4413"], $result['Catania']); $this->assertSame([], ResponseParser::parseGeoArray([])); }