mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-03-11 13:24:07 +00:00
fix style
This commit is contained in:
@@ -449,8 +449,8 @@ class PlaceLookup
|
|||||||
}
|
}
|
||||||
|
|
||||||
$aPlace['addresstype'] = ClassTypes\getLabelTag(
|
$aPlace['addresstype'] = ClassTypes\getLabelTag(
|
||||||
$aPlace,
|
$aPlace,
|
||||||
$aPlace['country_code']
|
$aPlace['country_code']
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,41 +9,40 @@ class ClassTypesTest extends \PHPUnit\Framework\TestCase
|
|||||||
public function testGetLabelTag()
|
public function testGetLabelTag()
|
||||||
{
|
{
|
||||||
$aPlace = array('class' => 'boundary', 'type' => 'administrative',
|
$aPlace = array('class' => 'boundary', 'type' => 'administrative',
|
||||||
'rank_address' => '4', 'place_type' => 'city');
|
'rank_address' => '4', 'place_type' => 'city');
|
||||||
$this->assertEquals('city', ClassTypes\getLabelTag($aPlace));
|
$this->assertEquals('city', ClassTypes\getLabelTag($aPlace));
|
||||||
|
|
||||||
$aPlace = array('class' => 'boundary', 'type' => 'administrative',
|
$aPlace = array('class' => 'boundary', 'type' => 'administrative',
|
||||||
'rank_address' => '10');
|
'rank_address' => '10');
|
||||||
$this->assertEquals('state_district', ClassTypes\getLabelTag($aPlace));
|
$this->assertEquals('state_district', ClassTypes\getLabelTag($aPlace));
|
||||||
|
|
||||||
$aPlace = array('class' => 'boundary', 'type' => 'administrative');
|
$aPlace = array('class' => 'boundary', 'type' => 'administrative');
|
||||||
$this->assertEquals('administrative', ClassTypes\getLabelTag($aPlace));
|
$this->assertEquals('administrative', ClassTypes\getLabelTag($aPlace));
|
||||||
|
|
||||||
$aPlace = array('class' => 'place', 'type' => 'hamlet',
|
$aPlace = array('class' => 'place', 'type' => 'hamlet', 'rank_address' => '20');
|
||||||
'rank_address' => '20');
|
|
||||||
$this->assertEquals('hamlet', ClassTypes\getLabelTag($aPlace));
|
$this->assertEquals('hamlet', ClassTypes\getLabelTag($aPlace));
|
||||||
|
|
||||||
$aPlace = array('class' => 'highway', 'type' => 'residential',
|
$aPlace = array('class' => 'highway', 'type' => 'residential',
|
||||||
'rank_address' => '26');
|
'rank_address' => '26');
|
||||||
$this->assertEquals('road', ClassTypes\getLabelTag($aPlace));
|
$this->assertEquals('road', ClassTypes\getLabelTag($aPlace));
|
||||||
|
|
||||||
$aPlace = array('class' => 'place', 'type' => 'house_number',
|
$aPlace = array('class' => 'place', 'type' => 'house_number',
|
||||||
'rank_address' => '30');
|
'rank_address' => '30');
|
||||||
$this->assertEquals('house_number', ClassTypes\getLabelTag($aPlace));
|
$this->assertEquals('house_number', ClassTypes\getLabelTag($aPlace));
|
||||||
|
|
||||||
$aPlace = array('class' => 'amenity', 'type' => 'prison',
|
$aPlace = array('class' => 'amenity', 'type' => 'prison',
|
||||||
'rank_address' => '30');
|
'rank_address' => '30');
|
||||||
$this->assertEquals('amenity', ClassTypes\getLabelTag($aPlace));
|
$this->assertEquals('amenity', ClassTypes\getLabelTag($aPlace));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testGetLabel()
|
public function testGetLabel()
|
||||||
{
|
{
|
||||||
$aPlace = array('class' => 'boundary', 'type' => 'administrative',
|
$aPlace = array('class' => 'boundary', 'type' => 'administrative',
|
||||||
'rank_address' => '4', 'place_type' => 'city');
|
'rank_address' => '4', 'place_type' => 'city');
|
||||||
$this->assertEquals('City', ClassTypes\getLabel($aPlace));
|
$this->assertEquals('City', ClassTypes\getLabel($aPlace));
|
||||||
|
|
||||||
$aPlace = array('class' => 'boundary', 'type' => 'administrative',
|
$aPlace = array('class' => 'boundary', 'type' => 'administrative',
|
||||||
'rank_address' => '10');
|
'rank_address' => '10');
|
||||||
$this->assertEquals('State District', ClassTypes\getLabel($aPlace));
|
$this->assertEquals('State District', ClassTypes\getLabel($aPlace));
|
||||||
|
|
||||||
$aPlace = array('class' => 'boundary', 'type' => 'administrative');
|
$aPlace = array('class' => 'boundary', 'type' => 'administrative');
|
||||||
|
|||||||
Reference in New Issue
Block a user