integTests/ConnectionTest.php 1 location
|
@@ 30-38 (lines=9) @@
|
| 27 |
|
*/ |
| 28 |
|
protected $owm; |
| 29 |
|
|
| 30 |
|
protected function setUp() |
| 31 |
|
{ |
| 32 |
|
|
| 33 |
|
// Load the app configuration |
| 34 |
|
$ini = parse_ini_file(__DIR__ . '/ApiKey.ini'); |
| 35 |
|
$apiKey = $ini['api_key']; |
| 36 |
|
|
| 37 |
|
$this->owm = new OpenWeatherMap(); |
| 38 |
|
} |
| 39 |
|
|
| 40 |
|
public function testUnauthorizedAccess() |
| 41 |
|
{ |
integTests/CurrentWeatherTest.php 1 location
|
@@ 30-39 (lines=10) @@
|
| 27 |
|
*/ |
| 28 |
|
protected $owm; |
| 29 |
|
|
| 30 |
|
protected function setUp() |
| 31 |
|
{ |
| 32 |
|
|
| 33 |
|
// Load the app configuration |
| 34 |
|
$ini = parse_ini_file(__DIR__ . '/ApiKey.ini'); |
| 35 |
|
$apiKey = $ini['api_key']; |
| 36 |
|
|
| 37 |
|
$this->owm = new OpenWeatherMap(); |
| 38 |
|
$this->owm->setApiKey($apiKey); |
| 39 |
|
} |
| 40 |
|
|
| 41 |
|
public function testByCity() |
| 42 |
|
{ |
integTests/ForecastDailyTest.php 1 location
|
@@ 30-39 (lines=10) @@
|
| 27 |
|
*/ |
| 28 |
|
protected $owm; |
| 29 |
|
|
| 30 |
|
protected function setUp() |
| 31 |
|
{ |
| 32 |
|
$ini = parse_ini_file(__DIR__ . '/ApiKey.ini'); |
| 33 |
|
$apiKey = $ini['api_key']; |
| 34 |
|
|
| 35 |
|
$this->owm = new OpenWeatherMap(); |
| 36 |
|
$this->owm->setApiKey($apiKey); |
| 37 |
|
} |
| 38 |
|
|
| 39 |
|
public function testTemperatureMetric() |
| 40 |
|
{ |
| 41 |
|
$forecast = $this->owm->getWeatherForecast('Berlin', 'metric', 'de', '', 10); |
| 42 |
|
|