Test Setup Failed
Branch master (97a7ce)
by Anton
02:01
created

MapGeneratorTest::testMakeLink()   A

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 Anax\DI\DIFactoryConfig;
0 ignored issues
show
Bug introduced by
The type Anax\DI\DIFactoryConfig was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
use PHPUnit\Framework\TestCase;
7
8
/**
9
 * Test MapGenerator for Weather.
10
 */
11
class MapGeneratorTest extends TestCase
12
{
13
    /**
14
     * Test MakeLink() method.
15
     * Gets info.
16
     */
17
    public function testMakeLink()
18
    {
19
        $sut = new MapGenerator();
20
21
        $long1 = -4;
22
        $lat1 = -1.5;
23
        $long2 = 4;
24
        $lat2 = 1.5;
25
        $latitude = 0;
26
        $longitude = 0;
27
        $link = "https://www.openstreetmap.org/export/embed.html?bbox=${long1}%2C${lat1}%2C${long2}%2C${lat2}&amp;layer=mapnik&amp;marker=${latitude}%2C${longitude}";
28
29
        $result = $sut->MakeLink($latitude, $longitude);
30
31
        $this->assertEquals($link, $result);
32
    }
33
}
34