Skip to content

Commit 18a568a

Browse files
MAGETWO-80223: Fix syntax of expectException() calls #11099
2 parents 974d12e + 6c9720d commit 18a568a

File tree

75 files changed

+208
-104
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+208
-104
lines changed

app/code/Magento/Backend/Test/Unit/Model/Config/SessionLifetime/BackendModelTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ public function testBeforeSave($value, $errorMessage = null)
2020
\Magento\Backend\Model\Config\SessionLifetime\BackendModel::class
2121
);
2222
if ($errorMessage !== null) {
23-
$this->expectException(\Magento\Framework\Exception\LocalizedException::class, $errorMessage);
23+
$this->expectException(\Magento\Framework\Exception\LocalizedException::class);
24+
$this->expectExceptionMessage($errorMessage);
2425
}
2526
$model->setValue($value);
2627
$object = $model->beforeSave();

app/code/Magento/Catalog/Test/Unit/Model/CategoryRepositoryTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,8 @@ public function testSaveWithException()
255255
*/
256256
public function testSaveWithValidateCategoryException($error, $expectedException, $expectedExceptionMessage)
257257
{
258-
$this->expectException($expectedException, $expectedExceptionMessage);
258+
$this->expectException($expectedException);
259+
$this->expectExceptionMessage($expectedExceptionMessage);
259260
$categoryId = 5;
260261
$categoryMock = $this->createMock(\Magento\Catalog\Model\Category::class);
261262
$this->extensibleDataObjectConverterMock

app/code/Magento/Catalog/Test/Unit/Model/Indexer/Product/Eav/Action/FullTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ public function testExecuteWithAdapterErrorThrowsException()
4848
$tableSwitcherMock
4949
);
5050

51-
$this->expectException(\Magento\Framework\Exception\LocalizedException::class, $exceptionMessage);
51+
$this->expectException(\Magento\Framework\Exception\LocalizedException::class);
52+
$this->expectExceptionMessage($exceptionMessage);
5253

5354
$model->execute();
5455
}

app/code/Magento/CatalogInventory/Test/Unit/Model/Indexer/Stock/Action/FullTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ public function testExecuteWithAdapterErrorThrowsException()
4444
]
4545
);
4646

47-
$this->expectException(\Magento\Framework\Exception\LocalizedException::class, $exceptionMessage);
47+
$this->expectException(\Magento\Framework\Exception\LocalizedException::class);
48+
$this->expectExceptionMessage($exceptionMessage);
4849

4950
$model->execute();
5051
}

app/code/Magento/Config/Test/Unit/Block/System/Config/Form/Field/RegexceptionsTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ public function testRenderCellTemplateWrongColumnName()
128128

129129
$this->object->addColumn($wrongColumnName, $this->cellParameters);
130130

131-
$this->expectException('\Exception', 'Wrong column name specified.');
131+
$this->expectException('\Exception');
132+
$this->expectExceptionMessage('Wrong column name specified.');
132133

133134
$this->object->renderCellTemplate($columnName);
134135
}

app/code/Magento/Config/Test/Unit/Console/Command/ConfigSet/ProcessorFacadeTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,8 @@ public function testProcess()
132132
*/
133133
public function testProcessWithValidatorException(LocalizedException $exception)
134134
{
135-
$this->expectException(ValidatorException::class, 'Some error');
135+
$this->expectException(ValidatorException::class);
136+
$this->expectExceptionMessage('Some error');
136137
$this->scopeValidatorMock->expects($this->once())
137138
->method('isValid')
138139
->willThrowException($exception);

app/code/Magento/Config/Test/Unit/Model/Config/Structure/Mapper/Helper/RelativePathConverterTest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ public function testConvertWithInvalidRelativePath()
2424

2525
$exceptionMessage = sprintf('Invalid relative path %s in %s node', $relativePath, $nodePath);
2626

27-
$this->expectException('InvalidArgumentException', $exceptionMessage);
27+
$this->expectException('InvalidArgumentException');
28+
$this->expectExceptionMessage($exceptionMessage);
2829
$this->_sut->convert($nodePath, $relativePath);
2930
}
3031

@@ -35,7 +36,8 @@ public function testConvertWithInvalidRelativePath()
3536
*/
3637
public function testConvertWithInvalidArguments($nodePath, $relativePath)
3738
{
38-
$this->expectException('InvalidArgumentException', 'Invalid arguments');
39+
$this->expectException('InvalidArgumentException');
40+
$this->expectExceptionMessage('Invalid arguments');
3941
$this->_sut->convert($nodePath, $relativePath);
4042
}
4143

app/code/Magento/Config/Test/Unit/Model/ConfigTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,8 @@ public function testSetDataByPathEmpty()
280280
public function testSetDataByPathWrongDepth($path, $expectedException)
281281
{
282282
$expectedException = 'Allowed depth of configuration is 3 (<section>/<group>/<field>). ' . $expectedException;
283-
$this->expectException('\UnexpectedValueException', $expectedException);
283+
$this->expectException('\UnexpectedValueException');
284+
$this->expectExceptionMessage($expectedException);
284285
$value = 'value';
285286
$this->_model->setDataByPath($path, $value);
286287
}

app/code/Magento/ConfigurableProduct/Test/Unit/Model/OptionRepositoryTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,8 @@ public function testGetListNotConfigurableProduct()
356356
*/
357357
public function testValidateNewOptionData($attributeId, $label, $optionValues, $msg)
358358
{
359-
$this->expectException(\Magento\Framework\Exception\InputException::class, $msg);
359+
$this->expectException(\Magento\Framework\Exception\InputException::class);
360+
$this->expectExceptionMessage($msg);
360361
$optionValueMock = $this->getMockBuilder(\Magento\ConfigurableProduct\Api\Data\OptionValueInterface::class)
361362
->setMethods(['getValueIndex', 'getPricingValue', 'getIsPercent'])
362363
->getMockForAbstractClass();

app/code/Magento/ConfigurableProduct/Test/Unit/Model/Product/Cache/Tag/ConfigurableTest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,15 @@ protected function setUp()
3232

3333
public function testGetWithScalar()
3434
{
35-
$this->expectException(\InvalidArgumentException::class, 'Provided argument is not an object');
35+
$this->expectException(\InvalidArgumentException::class);
36+
$this->expectExceptionMessage('Provided argument is not an object');
3637
$this->model->getTags('scalar');
3738
}
3839

3940
public function testGetTagsWithObject()
4041
{
41-
$this->expectException(\InvalidArgumentException::class, 'Provided argument must be a product');
42+
$this->expectException(\InvalidArgumentException::class);
43+
$this->expectExceptionMessage('Provided argument must be a product');
4244
$this->model->getTags(new \stdClass());
4345
}
4446

app/code/Magento/Customer/Test/Unit/Model/LoggerTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ public function testLog($customerId, $data)
7171
$data = array_filter($data);
7272

7373
if (!$data) {
74-
$this->expectException('\InvalidArgumentException', 'Log data is empty');
74+
$this->expectException('\InvalidArgumentException');
75+
$this->expectExceptionMessage('Log data is empty');
7576
$this->logger->log($customerId, $data);
7677
return;
7778
}

app/code/Magento/Directory/Test/Unit/Model/Currency/Import/ConfigTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ protected function setUp()
2929
*/
3030
public function testConstructorException(array $configData, $expectedException)
3131
{
32-
$this->expectException('InvalidArgumentException', $expectedException);
32+
$this->expectException('InvalidArgumentException');
33+
$this->expectExceptionMessage($expectedException);
3334
new \Magento\Directory\Model\Currency\Import\Config($configData);
3435
}
3536

app/code/Magento/Eav/Test/Unit/Model/Entity/Attribute/SetTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ public function testValidateWithExistingName($attributeSetName, $exceptionMessag
4444
{
4545
$this->_model->getResource()->expects($this->any())->method('validate')->will($this->returnValue(false));
4646

47-
$this->expectException(\Magento\Framework\Exception\LocalizedException::class, $exceptionMessage);
47+
$this->expectException(\Magento\Framework\Exception\LocalizedException::class);
48+
$this->expectExceptionMessage($exceptionMessage);
4849
$this->_model->setAttributeSetName($attributeSetName);
4950
$this->_model->validate();
5051
}

app/code/Magento/Email/Test/Unit/Model/Template/ConfigTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,8 @@ public function testGetterMethodUnknownField(
311311
array $fixtureFields = [],
312312
$argument = null
313313
) {
314-
$this->expectException('UnexpectedValueException', $expectedException);
314+
$this->expectException('UnexpectedValueException');
315+
$this->expectExceptionMessage($expectedException);
315316
$dataStorage = $this->createPartialMock(\Magento\Email\Model\Template\Config\Data::class, ['get']);
316317
$dataStorage->expects(
317318
$this->atLeastOnce()

app/code/Magento/Integration/Test/Unit/Model/Oauth/TokenTest.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,8 @@ public function testValidateIfNotCallbackEstablishedAndNotValid()
384384
$this->validatorMock->expects($this->once())->method('isValid')->willReturn(false);
385385
$this->validatorMock->expects($this->once())->method('getMessages')->willReturn([$exceptionMessage]);
386386

387-
$this->expectException(\Magento\Framework\Oauth\Exception::class, $exceptionMessage);
387+
$this->expectException(\Magento\Framework\Oauth\Exception::class);
388+
$this->expectExceptionMessage($exceptionMessage);
388389

389390
$this->tokenModel->validate();
390391
}
@@ -402,7 +403,8 @@ public function testValidateIfSecretNotValid()
402403
$this->validatorKeyLengthMock->expects($this->once())->method('isValid')->willReturn(false);
403404
$this->validatorKeyLengthMock->expects($this->once())->method('getMessages')->willReturn([$exceptionMessage]);
404405

405-
$this->expectException(\Magento\Framework\Oauth\Exception::class, $exceptionMessage);
406+
$this->expectException(\Magento\Framework\Oauth\Exception::class);
407+
$this->expectExceptionMessage($exceptionMessage);
406408

407409
$this->tokenModel->validate();
408410
}
@@ -429,7 +431,8 @@ public function testValidateIfTokenNotValid()
429431
]
430432
);
431433
$this->validatorKeyLengthMock->expects($this->once())->method('getMessages')->willReturn([$exceptionMessage]);
432-
$this->expectException(\Magento\Framework\Oauth\Exception::class, $exceptionMessage);
434+
$this->expectException(\Magento\Framework\Oauth\Exception::class);
435+
$this->expectExceptionMessage($exceptionMessage);
433436

434437
$this->tokenModel->validate();
435438
}
@@ -459,7 +462,8 @@ public function testValidateIfVerifierNotValid()
459462
]
460463
);
461464
$this->validatorKeyLengthMock->expects($this->once())->method('getMessages')->willReturn([$exceptionMessage]);
462-
$this->expectException(\Magento\Framework\Oauth\Exception::class, $exceptionMessage);
465+
$this->expectException(\Magento\Framework\Oauth\Exception::class);
466+
$this->expectExceptionMessage($exceptionMessage);
463467

464468
$this->tokenModel->validate();
465469
}

app/code/Magento/Paypal/Test/Unit/Model/Api/NvpTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,8 @@ protected function _invokeNvpProperty(\Magento\Paypal\Model\Api\Nvp $nvpObject,
126126
public function testCall($response, $processableErrors, $exception, $exceptionMessage = '', $exceptionCode = null)
127127
{
128128
if (isset($exception)) {
129-
$this->expectException($exception, $exceptionMessage, $exceptionCode);
129+
$this->expectException($exception);
130+
$this->expectExceptionMessage($exceptionMessage, $exceptionCode);
130131
}
131132
$this->curl->expects($this->once())
132133
->method('read')

app/code/Magento/Rule/Test/Unit/Model/ConditionFactoryTest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ public function testCreateExceptionClass()
7878
->expects($this->never())
7979
->method('create');
8080

81-
$this->expectException(\InvalidArgumentException::class, 'Class does not exist');
81+
$this->expectException(\InvalidArgumentException::class);
82+
$this->expectExceptionMessage('Class does not exist');
8283

8384
$this->conditionFactory->create($type);
8485
}
@@ -92,7 +93,8 @@ public function testCreateExceptionType()
9293
->method('create')
9394
->with($type)
9495
->willReturn(new \stdClass());
95-
$this->expectException(\InvalidArgumentException::class, 'Class does not implement condition interface');
96+
$this->expectException(\InvalidArgumentException::class);
97+
$this->expectExceptionMessage('Class does not implement condition interface');
9698
$this->conditionFactory->create($type);
9799
}
98100
}

app/code/Magento/SalesRule/Test/Unit/Model/CouponRepositoryTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,8 @@ public function testSaveWithExceptions($exceptionObject, $exceptionName, $except
150150
$this->resource->expects($this->once())->method('save')->with($coupon)
151151
->willThrowException($exceptionObject);
152152
}
153-
$this->expectException($exceptionName, $exceptionMessage);
153+
$this->expectException($exceptionName);
154+
$this->expectExceptionMessage($exceptionMessage);
154155
$this->model->save($coupon);
155156
}
156157

app/code/Magento/Tax/Test/Unit/Model/Calculation/RateRepositoryTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,8 @@ public function testSaveThrowsExceptionIfCannotSaveTitles($expectedException, $e
307307
->with($rateTitles)
308308
->willThrowException($expectedException);
309309
$this->rateRegistryMock->expects($this->never())->method('registerTaxRate')->with($rateMock);
310-
$this->expectException($exceptionType, $exceptionMessage);
310+
$this->expectException($exceptionType);
311+
$this->expectExceptionMessage($exceptionMessage);
311312
$this->model->save($rateMock);
312313
}
313314

app/code/Magento/Tax/Test/Unit/Model/Calculation/RateTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ protected function setUp()
4646
*/
4747
public function testExceptionOfValidation($exceptionMessage, $data)
4848
{
49-
$this->expectException(\Magento\Framework\Exception\LocalizedException::class, $exceptionMessage);
49+
$this->expectException(\Magento\Framework\Exception\LocalizedException::class);
50+
$this->expectExceptionMessage($exceptionMessage);
5051
$rate = $this->objectHelper->getObject(
5152
\Magento\Tax\Model\Calculation\Rate::class,
5253
['resource' => $this->resourceMock]

app/code/Magento/Tax/Test/Unit/Model/TaxRuleRepositoryTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,8 @@ public function testSaveWithExceptions($exceptionObject, $exceptionName, $except
163163
->willThrowException($exceptionObject);
164164
$this->taxRuleRegistry->expects($this->never())->method('registerTaxRule');
165165

166-
$this->expectException($exceptionName, $exceptionMessage);
166+
$this->expectException($exceptionName);
167+
$this->expectExceptionMessage($exceptionMessage);
167168
$this->model->save($rule);
168169
}
169170

app/code/Magento/Theme/Test/Unit/Observer/CleanThemeRelatedContentObserverTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ public function testCleanThemeRelatedContentException()
105105

106106
$this->themeConfig->expects($this->any())->method('isThemeAssignedToStore')->with($themeMock)->willReturn(true);
107107

108-
$this->expectException(\Magento\Framework\Exception\LocalizedException::class, 'Theme isn\'t deletable.');
108+
$this->expectException(\Magento\Framework\Exception\LocalizedException::class);
109+
$this->expectExceptionMessage('Theme isn\'t deletable.');
109110
$this->themeObserver->execute($observerMock);
110111
}
111112

app/code/Magento/Ui/Test/Unit/Model/ResourceModel/BookmarkRepositoryTest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ public function testSaveWithException()
9494
->method('save')
9595
->with($this->bookmarkMock)
9696
->willThrowException(new \Exception($exceptionMessage));
97-
$this->expectException(\Magento\Framework\Exception\CouldNotSaveException::class, __($exceptionMessage));
97+
$this->expectException(\Magento\Framework\Exception\CouldNotSaveException::class);
98+
$this->expectExceptionMessage($exceptionMessage);
9899
$this->bookmarkRepository->save($this->bookmarkMock);
99100
}
100101

@@ -143,7 +144,8 @@ public function testDeleteWithException()
143144
->method('delete')
144145
->with($this->bookmarkMock)
145146
->willThrowException(new \Exception($exceptionMessage));
146-
$this->expectException(\Magento\Framework\Exception\CouldNotDeleteException::class, __($exceptionMessage));
147+
$this->expectException(\Magento\Framework\Exception\CouldNotDeleteException::class);
148+
$this->expectExceptionMessage($exceptionMessage);
147149
$this->assertTrue($this->bookmarkRepository->delete($this->bookmarkMock));
148150
}
149151

app/code/Magento/Webapi/Test/Unit/ExceptionTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ public function testConstruct()
4343
*/
4444
public function testConstructInvalidHttpCode($httpCode)
4545
{
46-
$this->expectException('InvalidArgumentException', "The specified HTTP code \"{$httpCode}\" is invalid.");
46+
$this->expectException('InvalidArgumentException');
47+
$this->expectExceptionMessage("The specified HTTP code \"{$httpCode}\" is invalid.");
4748
/** Create \Magento\Framework\Webapi\Exception object with invalid code. */
4849
/** Valid codes range is from 400 to 599. */
4950
new \Magento\Framework\Webapi\Exception(__('Message'), 0, $httpCode);

app/code/Magento/Weee/Test/Unit/Model/Attribute/Backend/Weee/TaxTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ public function testValidate($data, $expected)
8282
->will($this->returnValue($taxes));
8383

8484
// Exception caught
85-
$this->expectException('Exception', $expected);
85+
$this->expectException('Exception');
86+
$this->expectExceptionMessage($expected);
8687
$modelMock->validate($productMock);
8788
}
8889

app/code/Magento/Wishlist/Test/Unit/Model/ItemTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,8 @@ public function testSetAndSaveItemOptions()
299299

300300
public function testGetProductWithException()
301301
{
302-
$this->expectException(\Magento\Framework\Exception\LocalizedException::class, __('Cannot specify product.'));
302+
$this->expectException(\Magento\Framework\Exception\LocalizedException::class);
303+
$this->expectExceptionMessage('Cannot specify product.');
303304
$this->model->getProduct();
304305
}
305306

dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductAttributeMediaGalleryManagementInterfaceTest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -609,9 +609,11 @@ public function testGetListForAbsentSku()
609609
'sku' => $productSku,
610610
];
611611
if (TESTS_WEB_API_ADAPTER == self::ADAPTER_SOAP) {
612-
$this->expectException('SoapFault', 'Requested product doesn\'t exist');
612+
$this->expectException('SoapFault');
613+
$this->expectExceptionMessage('Requested product doesn\'t exist');
613614
} else {
614-
$this->expectException('Exception', '', 404);
615+
$this->expectException('Exception');
616+
$this->expectExceptionCode(404);
615617
}
616618
$this->_webApiCall($serviceInfo, $requestData);
617619
}

dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductCustomAttributeWrongTypeTest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,11 @@ public function testCustomAttributeWrongType()
4343
];
4444

4545
if (TESTS_WEB_API_ADAPTER == self::ADAPTER_SOAP) {
46-
$this->expectException('Exception', 'Attribute "meta_title" has invalid value.');
46+
$this->expectException('Exception');
47+
$this->expectExceptionMessage('Attribute "meta_title" has invalid value.');
4748
} else {
48-
$this->expectException('Exception', 'Attribute \"meta_title\" has invalid value.');
49+
$this->expectException('Exception');
50+
$this->expectExceptionMessage('Attribute \"meta_title\" has invalid value.');
4951
}
5052

5153
$this->_webApiCall($serviceInfo, $this->getRequestData());

dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductCustomOptionRepositoryTest.php

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -211,12 +211,15 @@ public function testAddNegative($optionData)
211211

212212
if (TESTS_WEB_API_ADAPTER == self::ADAPTER_SOAP) {
213213
if (isset($optionDataPost['title']) && empty($optionDataPost['title'])) {
214-
$this->expectException('SoapFault', 'Missed values for option required fields');
214+
$this->expectException('SoapFault');
215+
$this->expectExceptionMessage('Missed values for option required fields');
215216
} else {
216-
$this->expectException('SoapFault', 'Invalid option');
217+
$this->expectException('SoapFault');
218+
$this->expectExceptionMessage('Invalid option');
217219
}
218220
} else {
219-
$this->expectException('Exception', '', 400);
221+
$this->expectException('Exception');
222+
$this->expectExceptionMessage('', 400);
220223
}
221224
$this->_webApiCall($serviceInfo, ['option' => $optionDataPost]);
222225
}
@@ -388,8 +391,9 @@ public function validOptionDataProvider()
388391
* @dataProvider optionNegativeUpdateDataProvider
389392
* @param array $optionData
390393
* @param string $message
394+
* @param int $exceptionCode
391395
*/
392-
public function testUpdateNegative($optionData, $message)
396+
public function testUpdateNegative($optionData, $message, $exceptionCode)
393397
{
394398
$this->_markTestAsRestOnly();
395399
$productSku = 'simple';
@@ -406,7 +410,9 @@ public function testUpdateNegative($optionData, $message)
406410
],
407411
];
408412

409-
$this->expectException('Exception', $message, 400);
413+
$this->expectException('Exception');
414+
$this->expectExceptionMessage($message);
415+
$this->expectExceptionCode($exceptionCode);
410416
$this->_webApiCall($serviceInfo, ['option' => $optionData]);
411417
}
412418

0 commit comments

Comments
 (0)