Skip to content

Commit 13c5dd8

Browse files
author
Magento CICD
authored
merge magento/2.3.0-release into magento-honey-badgers/bug_fixes_beta_bugs
2 parents 40bd9c6 + e1533b0 commit 13c5dd8

File tree

4 files changed

+23
-15
lines changed

4 files changed

+23
-15
lines changed

dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ProductTypeSwitchingOnCreationTest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
<data name="createProduct" xsi:type="string">downloadable</data>
7878
<data name="product" xsi:type="string">configurableProduct::not_virtual_for_type_switching</data>
7979
<data name="actionName" xsi:type="string">clearDownloadableData</data>
80+
<data name="issue" xsi:type="string">MSI-1624</data>
8081
<constraint name="Magento\Catalog\Test\Constraint\AssertProductSaveMessage" />
8182
<constraint name="Magento\Catalog\Test\Constraint\AssertProductInGrid" />
8283
<constraint name="Magento\ConfigurableProduct\Test\Constraint\AssertChildProductsInGrid" />

dev/tests/integration/testsuite/Magento/CatalogInventory/Model/Quote/Item/QuantityValidatorTest.php

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ private function setMockStockStateResultToQuoteItemOptions($quoteItem, $resultMo
170170
* Tests quantity verifications for configurable product.
171171
*
172172
* @param int $quantity - quantity of configurable option.
173-
* @param string $errorMessage - expected error message.
173+
* @param string $errorMessageRegexp - expected error message regexp.
174174
* @return void
175175
* @throws CouldNotSaveException
176176
* @throws LocalizedException
@@ -179,7 +179,7 @@ private function setMockStockStateResultToQuoteItemOptions($quoteItem, $resultMo
179179
* @magentoDbIsolation enabled
180180
* @magentoAppIsolation enabled
181181
*/
182-
public function testConfigurableWithOptions(int $quantity, string $errorMessage): void
182+
public function testConfigurableWithOptions(int $quantity, string $errorMessageRegexp): void
183183
{
184184
/** @var ProductRepositoryInterface $productRepository */
185185
$productRepository = $this->objectManager->create(ProductRepositoryInterface::class);
@@ -217,17 +217,16 @@ public function testConfigurableWithOptions(int $quantity, string $errorMessage)
217217
]
218218
);
219219

220-
if (!empty($errorMessage)) {
221-
$this->expectException(LocalizedException::class);
222-
$this->expectExceptionMessage($errorMessage);
223-
}
224-
225-
/** @var Quote $cart */
226-
$cart = $this->objectManager->create(CartInterface::class);
227-
$result = $cart->addProduct($product, $request);
220+
try {
221+
/** @var Quote $cart */
222+
$cart = $this->objectManager->create(CartInterface::class);
223+
$result = $cart->addProduct($product, $request);
228224

229-
if (empty($errorMessage)) {
230-
self::assertEquals('Configurable Product', $result->getName());
225+
if (empty($errorMessageRegexp)) {
226+
self::assertEquals('Configurable Product', $result->getName());
227+
}
228+
} catch (LocalizedException $e) {
229+
self::assertEquals(1, preg_match($errorMessageRegexp, $e->getMessage()));
231230
}
232231
}
233232

@@ -239,18 +238,20 @@ public function testConfigurableWithOptions(int $quantity, string $errorMessage)
239238
*/
240239
public function quantityDataProvider(): array
241240
{
241+
$qtyRegexp = '/You can buy (this product|Configurable OptionOption 1) only in quantities of 500 at a time/';
242+
242243
return [
243244
[
244245
'quantity' => 1,
245-
'error' => 'The fewest you may purchase is 500.'
246+
'error_regexp' => '/The fewest you may purchase is 500/'
246247
],
247248
[
248249
'quantity' => 501,
249-
'error' => 'You can buy Configurable OptionOption 1 only in quantities of 500 at a time'
250+
'error_regexp' => $qtyRegexp
250251
],
251252
[
252253
'quantity' => 1000,
253-
'error' => ''
254+
'error_regexp' => ''
254255
],
255256

256257
];

dev/tests/static/framework/Magento/ruleset.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,21 @@
3030
<exclude-pattern>*/_files/*</exclude-pattern>
3131
<exclude-pattern>*/Test/*</exclude-pattern>
3232
<exclude-pattern>*Test.php</exclude-pattern>
33+
<exclude-pattern>*/Magento/Inventory*/*</exclude-pattern>
3334
</rule>
3435
<rule ref="Magento.Annotation.MethodAnnotationStructure">
3536
<include-pattern>*\.(php)</include-pattern>
3637
<exclude-pattern>*/Test/*</exclude-pattern>
3738
<exclude-pattern>*Test.php</exclude-pattern>
3839
<exclude-pattern>*/_files/*</exclude-pattern>
40+
<exclude-pattern>*/Magento/Inventory*/*</exclude-pattern>
3941
</rule>
4042
<rule ref="Magento.Annotation.ClassAnnotationStructure">
4143
<include-pattern>*\.(php)</include-pattern>
4244
<exclude-pattern>*/Test/*</exclude-pattern>
4345
<exclude-pattern>*Test.php</exclude-pattern>
4446
<exclude-pattern>*/_files/*</exclude-pattern>
47+
<exclude-pattern>*/Magento/Inventory*/*</exclude-pattern>
4548
</rule>
4649
<rule ref="Magento.Functions.OutputBuffering">
4750
<include-pattern>*/(app/code|vendor|setup/src|lib/internal/Magento)/*</include-pattern>

dev/tests/static/testsuite/Magento/Test/Php/_files/phpcpd/blacklist/common.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,3 +202,6 @@ setup/performance-toolkit/aggregate-report
202202
Magento/MessageQueue/Setup
203203
Magento/Elasticsearch/Elasticsearch5
204204
Test/_files
205+
Magento/InventoryCatalogAdminUi/Controller/Adminhtml
206+
Magento/InventoryConfigurableProductIndexer/Indexer
207+
Magento/InventoryGroupedProductIndexer/Indexer

0 commit comments

Comments
 (0)