MapGeneratorTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 11
dl 0
loc 21
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A testMakeLink() 0 15 1
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