| Total Complexity | 3 |
| Total Lines | 51 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | class WeatherTest extends TestCase |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * Test getWeather() method. |
||
| 15 | * No errors. |
||
| 16 | */ |
||
| 17 | public function testGetWeather() |
||
| 18 | { |
||
| 19 | $mockMultiCurl = new MockMultiCurl([[]]); |
||
| 20 | |||
| 21 | $sut = new Weather("baseurl", $mockMultiCurl); |
||
| 22 | |||
| 23 | $result = $sut->getWeather("test", "test"); |
||
| 24 | |||
| 25 | $this->assertInternalType("array", $result); |
||
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Test getWeather() method. |
||
| 30 | * Has error 400. |
||
| 31 | */ |
||
| 32 | public function testGetWeatherError() |
||
| 33 | { |
||
| 34 | $mockMultiCurl = new MockMultiCurl([[ |
||
| 35 | "error" => "test", |
||
| 36 | "code" => 400 |
||
| 37 | ]]); |
||
| 38 | |||
| 39 | $sut = new Weather("baseurl", $mockMultiCurl); |
||
| 40 | |||
| 41 | $result = $sut->getWeather("test", "test"); |
||
| 42 | |||
| 43 | $this->assertInternalType("string", $result); |
||
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * Test getWeather() method. |
||
| 48 | * Has error, code != 400. |
||
| 49 | */ |
||
| 50 | public function testGetWeatherErrorOther() |
||
| 62 | } |
||
| 63 | } |
||
| 64 |
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