@@ 280-289 (lines=10) @@ | ||
277 | * @expectedException Radowoj\Yaah\Exception |
|
278 | * @expectedExceptionMessage Method nonexistentMethodWithoutWebApiDoPrefix is not implemented |
|
279 | */ |
|
280 | public function testExceptionOnNonexistentMethodWithoutDoPrefix() |
|
281 | { |
|
282 | $apiClient = $this->getMockBuilder(Client::class) |
|
283 | ->setConstructorArgs([$this->config, $this->soapClient]) |
|
284 | ->setMethods(['getLocalVersionKey', 'login', 'doChangeQuantityItem']) |
|
285 | ->getMock(); |
|
286 | ||
287 | $helper = new Helper($apiClient); |
|
288 | $helper->nonexistentMethodWithoutWebApiDoPrefix(); |
|
289 | } |
|
290 | ||
291 | ||
292 | /** |
|
@@ 296-305 (lines=10) @@ | ||
293 | * @expectedException Radowoj\Yaah\Exception |
|
294 | * @expectedExceptionMessage Invalid WebAPI response |
|
295 | */ |
|
296 | public function testExceptionOnInvalidApiResponseFromGetFieldsByCategory() |
|
297 | { |
|
298 | $apiClient = $this->getMockBuilder(Client::class) |
|
299 | ->setConstructorArgs([$this->config, $this->soapClient]) |
|
300 | ->setMethods(['getLocalVersionKey', 'login', 'doGetSellFormFieldsForCategory']) |
|
301 | ->getMock(); |
|
302 | ||
303 | $helper = new Helper($apiClient); |
|
304 | $helper->getFieldsByCategory(42); |
|
305 | } |
|
306 | ||
307 | ||
308 | public function testGetFieldsByCategory() |