| @@ 121-130 (lines=10) @@ | ||
| 118 | /** |
|
| 119 | * @expectedException InvalidArgumentException |
|
| 120 | */ |
|
| 121 | public function testGetWeatherHistoryInvalidArgumentException() |
|
| 122 | { |
|
| 123 | $weather = $this->weather; |
|
| 124 | ||
| 125 | try { |
|
| 126 | $argException = $weather->getWeatherHistory('Berlin', new \DateTime('NOW'), 1, 'wrong-type', 'imperial', 'en', ''); |
|
| 127 | } catch (\InvalidArgumentException $e) { |
|
| 128 | throw $e; |
|
| 129 | } |
|
| 130 | } |
|
| 131 | ||
| 132 | /** |
|
| 133 | * @expectedException InvalidArgumentException |
|
| @@ 149-158 (lines=10) @@ | ||
| 146 | /** |
|
| 147 | * @expectedException InvalidArgumentException |
|
| 148 | */ |
|
| 149 | public function testGetRawWeatherHistoryException() |
|
| 150 | { |
|
| 151 | $weather = $this->weather; |
|
| 152 | ||
| 153 | try { |
|
| 154 | $argException = $weather->getRawWeatherHistory('Berlin', new \DateTime('NOW'), 1, 'wrong-type', 'imperial', 'en', ''); |
|
| 155 | } catch (\InvalidArgumentException $e) { |
|
| 156 | throw $e; |
|
| 157 | } |
|
| 158 | } |
|
| 159 | ||
| 160 | /** |
|
| 161 | * @expectedException InvalidArgumentException |
|
| @@ 163-172 (lines=10) @@ | ||
| 160 | /** |
|
| 161 | * @expectedException InvalidArgumentException |
|
| 162 | */ |
|
| 163 | public function testGetRawWeatherHistoryWithEndDateException() |
|
| 164 | { |
|
| 165 | $weather = $this->weather; |
|
| 166 | ||
| 167 | try { |
|
| 168 | $argException = $weather->getRawWeatherHistory('Berlin', new \DateTime('NOW'), 'wrong-endOrCount', 'hour', 'imperial', 'en', ''); |
|
| 169 | } catch (\InvalidArgumentException $e) { |
|
| 170 | throw $e; |
|
| 171 | } |
|
| 172 | } |
|
| 173 | ||
| 174 | /** |
|
| 175 | * @expectedException InvalidArgumentException |
|
| @@ 177-186 (lines=10) @@ | ||
| 174 | /** |
|
| 175 | * @expectedException InvalidArgumentException |
|
| 176 | */ |
|
| 177 | public function testBuildQueryUrlParameterException() |
|
| 178 | { |
|
| 179 | $weather = $this->weather; |
|
| 180 | ||
| 181 | try { |
|
| 182 | $argException = $weather->getWeather(true, new \DateTime('NOW'), 'wrong-endOrCount', 'hour', 'imperial', 'en', ''); |
|
| 183 | } catch (\InvalidArgumentException $e) { |
|
| 184 | throw $e; |
|
| 185 | } |
|
| 186 | } |
|
| 187 | ||
| 188 | /** |
|
| 189 | * @expectedException Exception |
|