Passed
Pull Request — master (#15)
by Ylva
02:37
created

WeatherHandlerTest::testGetWeatherMap()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
nc 1
nop 0
dl 0
loc 7
c 1
b 0
f 0
cc 1
rs 10
1
<?php
2
3
namespace Ylvan\Models;
4
5
// require 'helpers/IpHandler.php';
6
7
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...
8
use PHPUnit\Framework\TestCase;
9
10
/**
11
 * Test the helprt class IpHandler.
12
 */
13
class WeatherHandlerTest extends TestCase
14
{
15
16
    /**
17
     * Test get weather for lat, long
18
     */
19
    public function testGetWeather()
20
    {
21
        $weather = new WeatherHandler();
22
        $lat = '55';
23
        $lon = '12';
24
        $res = $weather->getWeather($lat, $lon);
25
        $this->assertIsArray($res);
26
    }
27
28
    /**
29
     * Test get weather for lat, long
30
     */
31
    public function testGetForecastWeather()
32
    {
33
        $weather = new WeatherHandler();
34
        $lat = '55';
35
        $lon = '12';
36
        $res = $weather->getForecastWeather($lat, $lon);
37
        $this->assertIsArray($res);
38
    }
39
   
40
   
41
    /**
42
     * Test get weather for lat, long
43
     */
44
    public function testGetHistoryWeather()
45
    {
46
        $weather = new WeatherHandler();
47
        $lat = '55';
48
        $lon = '12';
49
        $res = $weather->getHistoryWeather($lat, $lon);
50
        $this->assertIsArray($res);
51
    }
52
   
53
   
54
    /**
55
     * Test get Map for lat, long
56
     */
57
    public function testGetWeatherMap()
58
    {
59
        $weather = new WeatherHandler();
60
        $lat = '55';
61
        $lon = '12';
62
        $res = $weather->getWeatherMap($lat, $lon);
63
        $this->assertIsArray($res);
64
    }
65
}
66