1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Ylvan\Models; |
4
|
|
|
|
5
|
|
|
// require 'helpers/IpHandler.php'; |
6
|
|
|
|
7
|
|
|
use Anax\DI\DIFactoryConfig; |
|
|
|
|
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
|
|
|
|
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:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths