use detailsPermaLink function on main website as well

This commit is contained in:
Sarah Hoffmann
2020-02-09 16:05:22 +01:00
parent 57ae3d03a1
commit c36fd72f99
4 changed files with 46 additions and 8 deletions

View File

@@ -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"'),
'<a class="xtype" href="details.php?osmtype=N&osmid=2&class=amenity">something</a>'
);
}
public function testDetailsPermaLinkWithExtraPropertiesTiger()
{
$aFeature = array('osm_type' => 'T', 'osm_id'=> 5, 'place_id' => 46);
$this->assertSame(
detailsPermaLink($aFeature, 'something', 'class="xtype"'),
'<a class="xtype" href="details.php?place_id=46">something</a>'
);
}