Skip to content

Commit 413dcba

Browse files
committed
Fixed minor issues.
1 parent fa3f4f7 commit 413dcba

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

integTests/ConnectionTest.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,24 +23,19 @@
2323
class ConnectionTest extends \PHPUnit_Framework_TestCase
2424
{
2525
/**
26-
* @var \OpenWeatherMap
26+
* @var OpenWeatherMap
2727
*/
2828
protected $owm;
2929

3030
protected function setUp()
3131
{
32-
33-
// Load the app configuration
34-
$ini = parse_ini_file(__DIR__ . '/ApiKey.ini');
35-
$apiKey = $ini['api_key'];
36-
3732
$this->owm = new OpenWeatherMap();
3833
}
3934

4035
public function testUnauthorizedAccess()
4136
{
4237
try {
43-
$weather = $this->owm->getWeather('Paris');
38+
$this->owm->getWeather('Paris');
4439
} catch (OWMException $e) {
4540
$this->assertEquals(401, $e->getCode());
4641
$this->assertRegExp('/^Invalid API key/', $e->getMessage());

integTests/CurrentWeatherTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,12 @@
2323
class CurrentWeatherTest extends \PHPUnit_Framework_TestCase
2424
{
2525
/**
26-
* @var \OpenWeatherMap
26+
* @var OpenWeatherMap
2727
*/
2828
protected $owm;
2929

3030
protected function setUp()
3131
{
32-
3332
// Load the app configuration
3433
$ini = parse_ini_file(__DIR__ . '/ApiKey.ini');
3534
$apiKey = $ini['api_key'];
@@ -64,7 +63,7 @@ public function testCityNotFound()
6463
{
6564
// City doesn't exist
6665
try {
67-
$weather = $this->owm->getWeather('InvalidCity');
66+
$this->owm->getWeather('InvalidCity');
6867
} catch (OWMException $e) {
6968
$this->assertEquals(404, $e->getCode());
7069
$this->assertEquals('Error: Not found city', $e->getMessage());

0 commit comments

Comments
 (0)