X-Git-Url: https://git.openstreetmap.org/nominatim.git/blobdiff_plain/57ae3d03a1ccfb464216b58e7e70abaf3a3d8c48..c36fd72f99ce6489b29fa846ec9af650747ab959:/test/php/Nominatim/OutputTest.php diff --git a/test/php/Nominatim/OutputTest.php b/test/php/Nominatim/OutputTest.php index ce9bfa35..48644845 100644 --- a/test/php/Nominatim/OutputTest.php +++ b/test/php/Nominatim/OutputTest.php @@ -51,6 +51,25 @@ class OutputTest extends \PHPUnit\Framework\TestCase ); } + public function testDetailsPermaLinkWithExtraPropertiesNode() + { + $aFeature = array('osm_type' => 'N', 'osm_id'=> 2, 'class' => 'amenity'); + $this->assertSame( + detailsPermaLink($aFeature, 'something', 'class="xtype"'), + 'something' + ); + } + + public function testDetailsPermaLinkWithExtraPropertiesTiger() + { + $aFeature = array('osm_type' => 'T', 'osm_id'=> 5, 'place_id' => 46); + $this->assertSame( + detailsPermaLink($aFeature, 'something', 'class="xtype"'), + 'something' + ); + } + +