-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathOneCallResourceTest.php
More file actions
48 lines (44 loc) · 1.52 KB
/
OneCallResourceTest.php
File metadata and controls
48 lines (44 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
namespace ProgrammatorDev\OpenWeatherMap\Test\Integration;
use ProgrammatorDev\OpenWeatherMap\Entity\OneCall\Weather;
use ProgrammatorDev\OpenWeatherMap\Entity\OneCall\WeatherMoment;
use ProgrammatorDev\OpenWeatherMap\Entity\OneCall\WeatherOverview;
use ProgrammatorDev\OpenWeatherMap\Entity\OneCall\WeatherSummary;
use ProgrammatorDev\OpenWeatherMap\Test\AbstractTest;
use ProgrammatorDev\OpenWeatherMap\Test\MockResponse;
use ProgrammatorDev\OpenWeatherMap\Test\Util\TestItemResponseTrait;
class OneCallResourceTest extends AbstractTest
{
use TestItemResponseTrait;
public static function provideItemResponseData(): \Generator
{
yield 'get weather' => [
Weather::class,
MockResponse::ONE_CALL_WEATHER,
'oneCall',
'getWeather',
[50, 50]
];
yield 'get weather by date' => [
WeatherMoment::class,
MockResponse::ONE_CALL_TIMEMACHINE,
'oneCall',
'getWeatherByDate',
[50, 50, new \DateTime()]
];
yield 'get weather summary by date' => [
WeatherSummary::class,
MockResponse::ONE_CALL_DAY_SUMMARY,
'oneCall',
'getWeatherSummaryByDate',
[50, 50, new \DateTime()]
];
yield 'get weather overview by date' => [
WeatherOverview::class,
MockResponse::ONE_CALL_OVERVIEW,
'oneCall',
'getWeatherOverviewByDate',
[50, 50, new \DateTime()]
];
}
}