Skip to content

Commit 3582793

Browse files
authored
ENGCOM-3293: Fix for Invalid Unit Test Annotations #18846
2 parents 59886f4 + f114b78 commit 3582793

File tree

17 files changed

+26
-26
lines changed

17 files changed

+26
-26
lines changed

app/code/Magento/Catalog/Test/Unit/Model/Product/Gallery/GalleryManagementTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ public function testGetWithNonExistingProduct()
266266

267267
/**
268268
* @expectedException \Magento\Framework\Exception\NoSuchEntityException
269-
* @expectedExceptionText The image doesn't exist. Verify and try again.
269+
* @expectedExceptionMessage The image doesn't exist. Verify and try again.
270270
*/
271271
public function testGetWithNonExistingImage()
272272
{

app/code/Magento/Catalog/Test/Unit/Model/Product/PriceModifierTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ protected function setUp()
5454

5555
/**
5656
* @expectedException \Magento\Framework\Exception\NoSuchEntityException
57-
* @expectedMessage Tier price is unavailable for this product.
57+
* @expectedExceptionMessage Product hasn't group price with such data: customerGroupId = '1', website = 1, qty = 3
5858
*/
5959
public function testRemoveWhenTierPricesNotExists()
6060
{
@@ -70,7 +70,7 @@ public function testRemoveWhenTierPricesNotExists()
7070

7171
/**
7272
* @expectedException \Magento\Framework\Exception\NoSuchEntityException
73-
* @expectedMessage For current customerGroupId = '10' with 'qty' = 15 any tier price exist'.
73+
* @expectedExceptionMessage Product hasn't group price with such data: customerGroupId = '10', website = 1, qty = 5
7474
*/
7575
public function testRemoveTierPriceForNonExistingCustomerGroup()
7676
{
@@ -81,7 +81,7 @@ public function testRemoveTierPriceForNonExistingCustomerGroup()
8181
->will($this->returnValue($this->prices));
8282
$this->productMock->expects($this->never())->method('setData');
8383
$this->productRepositoryMock->expects($this->never())->method('save');
84-
$this->priceModifier->removeTierPrice($this->productMock, 10, 15, 1);
84+
$this->priceModifier->removeTierPrice($this->productMock, 10, 5, 1);
8585
}
8686

8787
public function testSuccessfullyRemoveTierPriceSpecifiedForAllGroups()

app/code/Magento/Catalog/Test/Unit/Model/Product/TierPriceManagementTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ public function testSuccessDeleteTierPrice()
195195

196196
/**
197197
* @expectedException \Magento\Framework\Exception\NoSuchEntityException
198-
* @message The product doesn't exist. Verify and try again.
198+
* @expectedExceptionMessage No such entity.
199199
*/
200200
public function testDeleteTierPriceFromNonExistingProduct()
201201
{

app/code/Magento/Checkout/Test/Unit/Model/SidebarTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function testCheckQuoteItem()
9898

9999
/**
100100
* @expectedException \Magento\Framework\Exception\LocalizedException
101-
* @exceptedExceptionMessage The quote item isn't found. Verify the item and try again.
101+
* @expectedExceptionMessage The quote item isn't found. Verify the item and try again.
102102
*/
103103
public function testCheckQuoteItemWithException()
104104
{

app/code/Magento/Downloadable/Test/Unit/Helper/DownloadTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public function testSetResourceInvalidPath()
8989

9090
/**
9191
* @expectedException \Magento\Framework\Exception\LocalizedException
92-
* @exectedExceptionMessage Please set resource file and link type.
92+
* @expectedExceptionMessage Please set resource file and link type.
9393
*/
9494
public function testGetFileSizeNoResource()
9595
{

app/code/Magento/GiftMessage/Test/Unit/Model/Plugin/OrderSaveTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public function testAfterSaveGiftMessages()
128128

129129
/**
130130
* @expectedException \Magento\Framework\Exception\CouldNotSaveException
131-
* @expectedMessage The gift message couldn't be added to the "Test message" order.
131+
* @expectedExceptionMessage The gift message couldn't be added to the "Test message" order.
132132
*/
133133
public function testAfterSaveIfGiftMessagesNotExist()
134134
{
@@ -146,7 +146,7 @@ public function testAfterSaveIfGiftMessagesNotExist()
146146
$this->giftMessageOrderRepositoryMock
147147
->expects($this->once())
148148
->method('save')
149-
->willThrowException(new \Exception('TestMessage'));
149+
->willThrowException(new \Exception('Test message'));
150150

151151
// save Gift Messages on item level
152152
$this->orderMock->expects($this->never())->method('getItems');
@@ -155,7 +155,7 @@ public function testAfterSaveIfGiftMessagesNotExist()
155155

156156
/**
157157
* @expectedException \Magento\Framework\Exception\CouldNotSaveException
158-
* @expectedMessage The gift message couldn't be added to the "Test message" order.
158+
* @expectedExceptionMessage The gift message couldn't be added to the "Test message" order item.
159159
*/
160160
public function testAfterSaveIfItemGiftMessagesNotExist()
161161
{
@@ -185,7 +185,7 @@ public function testAfterSaveIfItemGiftMessagesNotExist()
185185
$this->giftMessageOrderItemRepositoryMock
186186
->expects($this->once())->method('save')
187187
->with($orderId, $orderItemId, $this->giftMessageMock)
188-
->willThrowException(new \Exception('TestMessage'));
188+
->willThrowException(new \Exception('Test message'));
189189
$this->plugin->afterSave($this->orderRepositoryMock, $this->orderMock);
190190
}
191191
}

app/code/Magento/Quote/Test/Unit/Model/GuestCartManagement/Plugin/AuthorizationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ protected function setUp()
3636

3737
/**
3838
* @expectedException \Magento\Framework\Exception\StateException
39-
* @expectedMessage You don't have the correct permissions to assign the customer to the cart.
39+
* @expectedExceptionMessage You don't have the correct permissions to assign the customer to the cart.
4040
*/
4141
public function testBeforeAssignCustomer()
4242
{

app/code/Magento/Quote/Test/Unit/Model/Quote/Item/UpdaterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ protected function setUp()
9292

9393
/**
9494
* @expectedException \InvalidArgumentException
95-
* @ExceptedExceptionMessage The qty value is required to update quote item.
95+
* @expectedExceptionMessage The qty value is required to update quote item.
9696
*/
9797
public function testUpdateNoQty()
9898
{

app/code/Magento/Quote/Test/Unit/Model/ShippingAddressManagementTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ protected function setUp()
102102

103103
/**
104104
* @expectedException \Magento\Framework\Exception\NoSuchEntityException
105-
* @expected ExceptionMessage error345
105+
* @expectedExceptionMessage error345
106106
*/
107107
public function testSetAddressValidationFailed()
108108
{

app/code/Magento/Search/Test/Unit/Model/SynonymGroupRepositoryTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function testSaveCreate()
5353

5454
/**
5555
* @expectedException \Magento\Search\Model\Synonym\MergeConflictException
56-
* @expecteExceptionMessage (c,d,e)
56+
* @expectedExceptionMessage Merge conflict with existing synonym group(s): (a,b,c)
5757
*/
5858
public function testSaveCreateMergeConflict()
5959
{
@@ -138,7 +138,7 @@ public function testSaveUpdate()
138138

139139
/**
140140
* @expectedException \Magento\Search\Model\Synonym\MergeConflictException
141-
* @expecteExceptionMessage (d,h,i)
141+
* @expectedExceptionMessage (d,h,i)
142142
*/
143143
public function testSaveUpdateMergeConflict()
144144
{

0 commit comments

Comments
 (0)