Skip to content

Commit f51438f

Browse files
committed
A few more tests.
1 parent 153dea9 commit f51438f

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

tests/Exceptions/OpenWeatherMapExceptionTest.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,9 @@ public function testGetRawWeatherHistoryWithEndDateException()
121121
* @expectedException \InvalidArgumentException
122122
* @dataProvider uvIndexExceptionDataProvider
123123
*/
124-
public function testGetRawUVIndexWithQueryErrorException($lat, $lon, $dateTime)
124+
public function testGetRawUVIndexWithQueryErrorException($lat, $lon, $dateTime, $precision)
125125
{
126-
$this->owm->getRawUVIndexData($lat, $lon, $dateTime);
126+
$this->owm->getRawUVIndexData($lat, $lon, $dateTime, $precision);
127127
}
128128

129129
/**
@@ -201,9 +201,10 @@ public function testParseJsonException()
201201
public function uvIndexExceptionDataProvider()
202202
{
203203
return array(
204-
array('error-query-format', 'foo', new \DateTime()),
205-
array(5.4, 1.2, 'foo'),
206-
array(5.4, 12, 'foo'),
204+
array('error-query-format', 'foo', new \DateTime(), 'year'),
205+
array(5.4, 1.2, 'foo', 'month'),
206+
array(5.4, 12, 'foo', 'day'),
207+
array(5.4, 1.2, 'foo', 'bar'),
207208
);
208209
}
209210

tests/OpenWeatherMapTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,9 @@ public function testGetWeather()
113113
public function testGetWeatherGroup()
114114
{
115115
$currentWeather = $this->owm->getWeatherGroup(array('2950159'), 'imperial', 'en', '');
116+
$this->assertInstanceOf('\Cmfcmf\OpenWeatherMap\CurrentWeatherGroup', $currentWeather);
116117

118+
$currentWeather = $this->owm->getWeatherGroup('2950159', 'imperial', 'en', '');
117119
$this->assertInstanceOf('\Cmfcmf\OpenWeatherMap\CurrentWeatherGroup', $currentWeather);
118120
}
119121

0 commit comments

Comments
 (0)