MapGeneratorTest::testMakeLink()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 15
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 10
nc 1
nop 0
dl 0
loc 15
rs 9.9332
c 0
b 0
f 0
1
<?php
2
3
namespace EVB\Weather;
4
5
use PHPUnit\Framework\TestCase;
6
7
/**
8
 * Test MapGenerator for Weather.
9
 */
10
class MapGeneratorTest extends TestCase
11
{
12
    /**
13
     * Test MakeLink() method.
14
     * Gets info.
15
     */
16
    public function testMakeLink()
17
    {
18
        $sut = new MapGenerator();
19
20
        $long1 = -4;
21
        $lat1 = -1.5;
22
        $long2 = 4;
23
        $lat2 = 1.5;
24
        $latitude = 0;
25
        $longitude = 0;
26
        $link = "https://www.openstreetmap.org/export/embed.html?bbox=${long1}%2C${lat1}%2C${long2}%2C${lat2}&amp;layer=mapnik&amp;marker=${latitude}%2C${longitude}";
27
28
        $result = $sut->MakeLink($latitude, $longitude);
29
30
        $this->assertEquals($link, $result);
31
    }
32
}
33