fix formatting

This commit is contained in:
Sarah Hoffmann 2020-02-09 16:57:55 +01:00
parent 97d87895bf
commit 3a3f9b3496

View File

@ -10,67 +10,62 @@ class OutputTest extends \PHPUnit\Framework\TestCase
{ {
$aFeature = array('osm_type' => 'N', 'osm_id'=> 38274, 'class' => 'place'); $aFeature = array('osm_type' => 'N', 'osm_id'=> 38274, 'class' => 'place');
$this->assertSame( $this->assertSame(
detailsPermaLink($aFeature), detailsPermaLink($aFeature),
'<a href="details.php?osmtype=N&osmid=38274&class=place">node 38274</a>' '<a href="details.php?osmtype=N&osmid=38274&class=place">node 38274</a>'
); );
} }
public function testDetailsPermaLinkWay() public function testDetailsPermaLinkWay()
{ {
$aFeature = array('osm_type' => 'W', 'osm_id'=> 65, 'class' => 'highway'); $aFeature = array('osm_type' => 'W', 'osm_id'=> 65, 'class' => 'highway');
$this->assertSame( $this->assertSame(
detailsPermaLink($aFeature), detailsPermaLink($aFeature),
'<a href="details.php?osmtype=W&osmid=65&class=highway">way 65</a>' '<a href="details.php?osmtype=W&osmid=65&class=highway">way 65</a>'
); );
} }
public function testDetailsPermaLinkRelation() public function testDetailsPermaLinkRelation()
{ {
$aFeature = array('osm_type' => 'R', 'osm_id'=> 9908, 'class' => 'waterway'); $aFeature = array('osm_type' => 'R', 'osm_id'=> 9908, 'class' => 'waterway');
$this->assertSame( $this->assertSame(
detailsPermaLink($aFeature), detailsPermaLink($aFeature),
'<a href="details.php?osmtype=R&osmid=9908&class=waterway">relation 9908</a>' '<a href="details.php?osmtype=R&osmid=9908&class=waterway">relation 9908</a>'
); );
} }
public function testDetailsPermaLinkTiger() public function testDetailsPermaLinkTiger()
{ {
$aFeature = array('osm_type' => 'T', 'osm_id'=> 2, 'place_id' => 334); $aFeature = array('osm_type' => 'T', 'osm_id'=> 2, 'place_id' => 334);
$this->assertSame( $this->assertSame(
detailsPermaLink($aFeature, 'foo'), detailsPermaLink($aFeature, 'foo'),
'<a href="details.php?place_id=334">foo</a>' '<a href="details.php?place_id=334">foo</a>'
); );
} }
public function testDetailsPermaLinkInterpolation() public function testDetailsPermaLinkInterpolation()
{ {
$aFeature = array('osm_type' => 'I', 'osm_id'=> 400, 'place_id' => 3); $aFeature = array('osm_type' => 'I', 'osm_id'=> 400, 'place_id' => 3);
$this->assertSame( $this->assertSame(
detailsPermaLink($aFeature, 'foo'), detailsPermaLink($aFeature, 'foo'),
'<a href="details.php?place_id=3">foo</a>' '<a href="details.php?place_id=3">foo</a>'
); );
} }
public function testDetailsPermaLinkWithExtraPropertiesNode() public function testDetailsPermaLinkWithExtraPropertiesNode()
{ {
$aFeature = array('osm_type' => 'N', 'osm_id'=> 2, 'class' => 'amenity'); $aFeature = array('osm_type' => 'N', 'osm_id'=> 2, 'class' => 'amenity');
$this->assertSame( $this->assertSame(
detailsPermaLink($aFeature, 'something', 'class="xtype"'), detailsPermaLink($aFeature, 'something', 'class="xtype"'),
'<a class="xtype" href="details.php?osmtype=N&osmid=2&class=amenity">something</a>' '<a class="xtype" href="details.php?osmtype=N&osmid=2&class=amenity">something</a>'
); );
} }
public function testDetailsPermaLinkWithExtraPropertiesTiger() public function testDetailsPermaLinkWithExtraPropertiesTiger()
{ {
$aFeature = array('osm_type' => 'T', 'osm_id'=> 5, 'place_id' => 46); $aFeature = array('osm_type' => 'T', 'osm_id'=> 5, 'place_id' => 46);
$this->assertSame( $this->assertSame(
detailsPermaLink($aFeature, 'something', 'class="xtype"'), detailsPermaLink($aFeature, 'something', 'class="xtype"'),
'<a class="xtype" href="details.php?place_id=46">something</a>' '<a class="xtype" href="details.php?place_id=46">something</a>'
); );
} }
} }