Skip to content

Commit d5eb185

Browse files
committed
Merge remote-tracking branch 'origin/MC-33071-CE-2' into MC-33071
2 parents 95be3d3 + 3dcb578 commit d5eb185

10 files changed

+14
-14
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ public function testCreateThrowsExceptionIfAttributeSetWithGivenNameAlreadyExist
185185
$this->_webApiCall($this->createServiceInfo, $arguments);
186186
$this->fail("Expected exception");
187187
} catch (\SoapFault $e) {
188-
$this->assertContains(
188+
$this->assertStringContainsString(
189189
$expectedMessage,
190190
$e->getMessage(),
191191
"SoapFault does not contain expected message."

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function testInfoNoSuchEntityException()
3939
try {
4040
$this->getAssignedProducts(-1);
4141
} catch (\Exception $e) {
42-
$this->assertContains('No such entity with %fieldName = %fieldValue', $e->getMessage());
42+
$this->assertStringContainsString('No such entity with %fieldName = %fieldValue', $e->getMessage());
4343
}
4444
}
4545

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public function testInfoNoSuchEntityException()
8989
try {
9090
$this->getInfoCategory(-1);
9191
} catch (\Exception $e) {
92-
$this->assertContains('No such entity with %fieldName = %fieldValue', $e->getMessage());
92+
$this->assertStringContainsString('No such entity with %fieldName = %fieldValue', $e->getMessage());
9393
}
9494
}
9595

@@ -168,7 +168,7 @@ public function testDeleteNoSuchEntityException()
168168
try {
169169
$this->deleteCategory(-1);
170170
} catch (\Exception $e) {
171-
$this->assertContains('No such entity with %fieldName = %fieldValue', $e->getMessage());
171+
$this->assertStringContainsString('No such entity with %fieldName = %fieldValue', $e->getMessage());
172172
}
173173
}
174174

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function testGet()
5858
$product = $productRepository->get(self::SIMPLE_PRODUCT_SKU);
5959

6060
$this->assertNotEmpty($response);
61-
$this->assertEquals($product->getCost(), $cost);
61+
$this->assertEquals($cost, (int)$product->getCost());
6262
}
6363

6464
/**
@@ -97,7 +97,7 @@ public function testUpdate()
9797
/** @var \Magento\Catalog\Api\Data\ProductInterface $product */
9898
$product = $productRepository->get(self::SIMPLE_PRODUCT_SKU);
9999
$this->assertEmpty($response);
100-
$this->assertEquals($product->getCost(), $newCost);
100+
$this->assertEquals($newCost, (int)$product->getCost());
101101
}
102102

103103
/**

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function testAssignAttributeWrongAttributeSet()
6363
$this->_webApiCall($this->getAssignServiceInfo(), $payload);
6464
$this->fail("Expected exception");
6565
} catch (\SoapFault $e) {
66-
$this->assertContains(
66+
$this->assertStringContainsString(
6767
$expectedMessage,
6868
$e->getMessage(),
6969
"SoapFault does not contain expected message."
@@ -86,7 +86,7 @@ public function testAssignAttributeWrongAttributeGroup()
8686
$this->_webApiCall($this->getAssignServiceInfo(), $payload);
8787
$this->fail("Expected exception");
8888
} catch (\SoapFault $e) {
89-
$this->assertContains(
89+
$this->assertStringContainsString(
9090
$expectedMessage,
9191
$e->getMessage(),
9292
"SoapFault does not contain expected message."
@@ -110,7 +110,7 @@ public function testAssignAttributeWrongAttribute()
110110
$this->_webApiCall($this->getAssignServiceInfo(), $payload);
111111
$this->fail("Expected exception");
112112
} catch (\SoapFault $e) {
113-
$this->assertContains(
113+
$this->assertStringContainsString(
114114
$expectedMessage,
115115
$e->getMessage(),
116116
"SoapFault does not contain expected message."

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ public function testDeleteNoSuchEntityException()
362362
$this->_webApiCall($serviceInfo, ['attributeCode' => $attributeCode]);
363363
$this->fail("Expected exception");
364364
} catch (\SoapFault $e) {
365-
$this->assertContains(
365+
$this->assertStringContainsString(
366366
$expectedMessage,
367367
$e->getMessage(),
368368
"SoapFault does not contain expected message."

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@ public function testGetTypes()
3838
'group' => __('Select'),
3939
];
4040
$this->assertGreaterThanOrEqual(10, count($types));
41-
$this->assertContains($excepted, $types);
41+
$this->assertContainsEquals($excepted, $types);
4242
}
4343
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function testGetItems()
2929
];
3030
$actual = $this->_webApiCall($serviceInfo);
3131
$expectedItems = ['name' => 'related', 'code' => Link::LINK_TYPE_RELATED];
32-
$this->assertContains($expectedItems, $actual);
32+
$this->assertContainsEquals($expectedItems, $actual);
3333
}
3434

3535
public function testGetItemAttributes()

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ public function testGetNoSuchEntityException()
170170
$this->_webApiCall($serviceInfo, ['sku' => $invalidSku]);
171171
$this->fail("Expected throwing exception");
172172
} catch (\SoapFault $e) {
173-
$this->assertContains(
173+
$this->assertStringContainsString(
174174
$expectedMessage,
175175
$e->getMessage(),
176176
"SoapFault does not contain expected message."

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function testAdd($optionData)
4646
$updatedData = $this->getAttributeOptions($testAttributeCode);
4747
$lastOption = array_pop($updatedData);
4848
foreach ($updatedData as $option) {
49-
$this->assertNotContains('id', $option['value']);
49+
$this->assertStringNotContainsString('id', $option['value']);
5050
}
5151
$this->assertEquals(
5252
$optionData[AttributeOptionInterface::STORE_LABELS][0][AttributeOptionLabelInterface::LABEL],

0 commit comments

Comments
 (0)