Skip to content

Commit 5cd4345

Browse files
🔃 [Magento Community Engineering] Community Contributions - 2.4-develop latest changes
Accepted Community Pull Requests: - #29947: #1801: User is not scrolled up to the "Login failed. Please check if the Secret Key..." error, and can miss the message (by @yolouiese) - #27391: magento/magento2#: Add a new index for `cron_schedule` table (by @atwixfirster) - #29906: fix category image is not removed from tmp folder after category save (by @engcom-Golf) - #27602: Order Invoice create page doesn't show order items properly for bundle product Fixed Issue #27350 (by @gauravagarwal1001) - #27832: Old price excluding TAX shown correct on Product Page (by @Krielkip) - #29925: Fix #29879 Breadcrump Undefined class constant 'XML_PATH_CATEGORY_URL_SUFFIX' (by @toxix) - #29006: Unable to insert widget with text value which contains }} string (by @engcom-Kilo) - #29863: Fixed critical error: The following tag(s) are not allowed: img (by @themystery404) - #28687: clear errors when apply new filters (by @AbdulRahmanAbouzaid) - #26877: Product not exist fix when attempt to get an image (by @ilnytskyi) Fixed GitHub Issues: - #29601: [Issue] magento/magento2#: Add a new index for `cron_schedule` table (reported by @m2-assistant[bot]) has been fixed in #27391 by @atwixfirster in 2.4-develop branch Related commits: 1. 652971e 2. 24d7a8a - #27350: Order Invoice create page doesn't show order items properly for bundle product (reported by @webkul-ajaysaini) has been fixed in #27602 by @gauravagarwal1001 in 2.4-develop branch Related commits: 1. 2f8b560 2. 51fcc42 3. 0591d51 4. 140c351 5. 699c98f - #11998: Old price excluding TAX is incorrectly replaced by JavaScript (reported by @VesnaS) has been fixed in #27832 by @Krielkip in 2.4-develop branch Related commits: 1. 65c06eb 2. 7f4b276 3. 21ad13f 4. 8f1020a 5. cfb762d 6. c6a43f3 7. 84124f7 8. 43b4f64 9. 9fd5436 - #27500: Unit Tests incompatible with PHPUnit 8 (reported by @lbajsarowicz) has been fixed in #27832 by @Krielkip in 2.4-develop branch Related commits: 1. 65c06eb 2. 7f4b276 3. 21ad13f 4. 8f1020a 5. cfb762d 6. c6a43f3 7. 84124f7 8. 43b4f64 9. 9fd5436 - #28981: [Issue] Fixed 'Undefined class constant' error when interceptor is generated. (reported by @m2-assistant[bot]) has been fixed in #29925 by @toxix in 2.4-develop branch Related commits: 1. 2d1d097 - #29879: Late Static Binding on private constants in Magento\Catalog\ViewModel\Product\Breadcrumbs (reported by @Cheeerd) has been fixed in #29925 by @toxix in 2.4-develop branch Related commits: 1. 2d1d097 - #12087: Unable to insert widget with text value which contains }} string (reported by @ghost) has been fixed in #29006 by @engcom-Kilo in 2.4-develop branch Related commits: 1. 7f0f260 2. 2a48abe 3. e0eb4b0 4. cb0b3d4 5. 1f84319 6. f55eeb4 7. ae3d3df 8. a2346f4 9. 74325ef 10. 0ac2e5d 11. edd3401 12. ace8a6f 13. 01b7906 - #29958: [Issue] Fixed critical error: The following tag(s) are not allowed: img (reported by @m2-assistant[bot]) has been fixed in #29863 by @themystery404 in 2.4-develop branch Related commits: 1. 798e61f 2. 0472281 - #8538: No ability to reset filters after an error (reported by @spyrule) has been fixed in #28687 by @AbdulRahmanAbouzaid in 2.4-develop branch Related commits: 1. 674324c 2. 9fac5f7 3. 3852c89 4. 7517b21 5. cef2186 - #26876: Error when sending sales mails in async mode if product was removed (reported by @ilnytskyi) has been fixed in #26877 by @ilnytskyi in 2.4-develop branch Related commits: 1. 405dfec 2. f8a5126 3. da38103
2 parents 4003ee5 + 949b3da commit 5cd4345

File tree

35 files changed

+645
-112
lines changed

35 files changed

+645
-112
lines changed
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
9+
<test name="StorefrontBundlePlaceOrderWithMultipleOptionsSuccessTest">
10+
<annotations>
11+
<features value="Bundle"/>
12+
<stories value="Bundle product details page"/>
13+
<title value="Customer should be able to see all the bundle items in invoice view"/>
14+
<description value="Customer should be able to see all the bundle items in invoice view"/>
15+
<severity value="MAJOR"/>
16+
<testCaseId value="MC-37515"/>
17+
<group value="Bundle"/>
18+
</annotations>
19+
<before>
20+
<createData entity="_defaultCategory" stepKey="createPreReqCategory"/>
21+
<createData entity="SimpleProduct2" stepKey="firstSimpleProduct"/>
22+
<createData entity="SimpleProduct2" stepKey="secondSimpleProduct"/>
23+
<createData entity="CustomerEntityOne" stepKey="createCustomer"/>
24+
<actionGroup stepKey="loginToAdminPanel" ref="AdminLoginActionGroup"/>
25+
</before>
26+
<after>
27+
<deleteData createDataKey="createPreReqCategory" stepKey="deletePreReqCategory"/>
28+
<deleteData createDataKey="firstSimpleProduct" stepKey="deleteFirstSimpleProduct"/>
29+
<deleteData createDataKey="secondSimpleProduct" stepKey="deleteSecondSimpleProduct"/>
30+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
31+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
32+
</after>
33+
<!-- Create new bundle product -->
34+
<actionGroup ref="GoToSpecifiedCreateProductPageActionGroup" stepKey="createBundleProduct">
35+
<argument name="productType" value="bundle"/>
36+
</actionGroup>
37+
38+
<!-- Fill all main fields -->
39+
<actionGroup ref="FillMainBundleProductFormActionGroup" stepKey="fillMainProductFields"/>
40+
41+
<!-- Add first bundle option to the product -->
42+
<actionGroup ref="AddBundleOptionWithTwoProductsActionGroup" stepKey="addFirstBundleOption">
43+
<argument name="x" value="0"/>
44+
<argument name="n" value="1"/>
45+
<argument name="prodOneSku" value="$firstSimpleProduct.sku$"/>
46+
<argument name="prodTwoSku" value="$secondSimpleProduct.sku$$"/>
47+
<argument name="optionTitle" value="{{CheckboxOption.title}}"/>
48+
<argument name="inputType" value="{{CheckboxOption.type}}"/>
49+
</actionGroup>
50+
51+
<!-- Save product form -->
52+
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveWithThreeOptions"/>
53+
54+
<!--Login customer on storefront-->
55+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginCustomer">
56+
<argument name="Customer" value="$$createCustomer$$" />
57+
</actionGroup>
58+
59+
<!--Open Product Page-->
60+
<actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openStorefrontProductPage">
61+
<argument name="productUrl" value="{{BundleProduct.name}}"/>
62+
</actionGroup>
63+
64+
<!-- Add bundle to cart -->
65+
<actionGroup ref="StorefrontSelectCustomizeAndAddToTheCartButtonActionGroup" stepKey="clickAddToCart">
66+
<argument name="productUrl" value="{{BundleProduct.name}}"/>
67+
</actionGroup>
68+
<checkOption selector="{{StorefrontBundledSection.checkboxOptionThreeProducts(CheckboxOption.title, '1')}}" stepKey="selectOption2Product1"/>
69+
<checkOption selector="{{StorefrontBundledSection.checkboxOptionThreeProducts(CheckboxOption.title, '2')}}" stepKey="selectOption2Product2"/>
70+
<actionGroup ref="StorefrontEnterProductQuantityAndAddToTheCartActionGroup" stepKey="enterProductQuantityAndAddToTheCart">
71+
<argument name="quantity" value="1"/>
72+
</actionGroup>
73+
74+
<!--Navigate to checkout-->
75+
<actionGroup ref="StorefrontOpenCheckoutPageActionGroup" stepKey="openCheckoutPage"/>
76+
<!-- Click next button to open payment section -->
77+
<actionGroup ref="StorefrontCheckoutClickNextButtonActionGroup" stepKey="clickNext"/>
78+
<!-- Click place order -->
79+
<actionGroup ref="ClickPlaceOrderActionGroup" stepKey="placeOrder"/>
80+
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="grabOrderNumber"/>
81+
82+
<!-- Order review page has address that was created during checkout -->
83+
<actionGroup ref="OpenOrderByIdActionGroup" stepKey="filterOrdersGridById">
84+
<argument name="orderId" value="{$grabOrderNumber}"/>
85+
</actionGroup>
86+
87+
<!-- Open create invoice page -->
88+
<actionGroup ref="StartCreateInvoiceFromOrderPageActionGroup" stepKey="startInvoice"/>
89+
90+
<!-- Assert item options display -->
91+
<see selector="{{AdminInvoiceItemsSection.bundleItem}}" userInput="50 x $firstSimpleProduct.sku$" stepKey="seeFirstProductInList"/>
92+
<see selector="{{AdminInvoiceItemsSection.bundleItem}}" userInput="50 x $secondSimpleProduct.sku$" stepKey="seeSecondProductInList"/>
93+
</test>
94+
</tests>

app/code/Magento/Bundle/view/adminhtml/templates/sales/invoice/create/items/renderer.phtml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<?php $items = $block->getChildren($_item); ?>
1616
<?php $_count = count($items) ?>
1717
<?php $_index = 0 ?>
18+
<?php $canEditItemQty = true ?>
1819
<?php
1920
/** @var \Magento\Catalog\Helper\Data $catalogHelper */
2021
$catalogHelper = $block->getData('catalogHelper');
@@ -37,7 +38,7 @@ $catalogHelper = $block->getData('catalogHelper');
3738
<?php if ($_item->getOrderItem()->getParentItem()): ?>
3839
<?php
3940
if ($shipTogether) {
40-
continue;
41+
$canEditItemQty = false;
4142
}
4243
?>
4344
<?php $attributes = $block->getSelectionAttributes($_item) ?>
@@ -130,7 +131,7 @@ $catalogHelper = $block->getData('catalogHelper');
130131
</td>
131132
<td class="col-qty-invoice">
132133
<?php if ($block->canShowPriceInfo($_item) || $shipTogether): ?>
133-
<?php if ($block->canEditQty()): ?>
134+
<?php if ($block->canEditQty() && $canEditItemQty): ?>
134135
<input type="text"
135136
class="input-text admin__control-text qty-input"
136137
name="invoice[items][<?= $block->escapeHtmlAttr($_item->getOrderItemId()) ?>]"

app/code/Magento/Catalog/Block/Product/View.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,10 @@ public function getJsonConfig()
196196
'productId' => (int)$product->getId(),
197197
'priceFormat' => $this->_localeFormat->getPriceFormat(),
198198
'prices' => [
199+
'baseOldPrice' => [
200+
'amount' => $priceInfo->getPrice('regular_price')->getAmount()->getBaseAmount() * 1,
201+
'adjustments' => []
202+
],
199203
'oldPrice' => [
200204
'amount' => $priceInfo->getPrice('regular_price')->getAmount()->getValue() * 1,
201205
'adjustments' => []

app/code/Magento/Catalog/Helper/Image.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,9 @@ public function backgroundColor($colorRGB)
384384
{
385385
// assume that 3 params were given instead of array
386386
if (!is_array($colorRGB)) {
387+
//phpcs:disable
387388
$colorRGB = func_get_args();
389+
//phpcs:enabled
388390
}
389391
$this->_getModel()->setBackgroundColor($colorRGB);
390392
return $this;
@@ -498,7 +500,11 @@ protected function initBaseFile()
498500
if ($this->getImageFile()) {
499501
$model->setBaseFile($this->getImageFile());
500502
} else {
501-
$model->setBaseFile($this->getProduct()->getData($model->getDestinationSubdir()));
503+
$model->setBaseFile(
504+
$this->getProduct()
505+
? $this->getProduct()->getData($model->getDestinationSubdir())
506+
: ''
507+
);
502508
}
503509
}
504510
return $this;

app/code/Magento/Catalog/Test/Unit/Helper/ImageTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,14 @@ public function testGetWidth()
396396
$this->assertEquals($data['width'], $this->helper->getWidth());
397397
}
398398

399+
/**
400+
* Check initBaseFile without properties - product
401+
*/
402+
public function testGetUrlWithOutProduct()
403+
{
404+
$this->assertNull($this->helper->getUrl());
405+
}
406+
399407
/**
400408
* @param array $data
401409
* @dataProvider getHeightDataProvider

app/code/Magento/Catalog/ViewModel/Product/Breadcrumbs.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function __construct(
7171
public function getCategoryUrlSuffix()
7272
{
7373
return $this->scopeConfig->getValue(
74-
static::XML_PATH_CATEGORY_URL_SUFFIX,
74+
self::XML_PATH_CATEGORY_URL_SUFFIX,
7575
ScopeInterface::SCOPE_STORE
7676
);
7777
}
@@ -84,7 +84,7 @@ public function getCategoryUrlSuffix()
8484
public function isCategoryUsedInProductUrl(): bool
8585
{
8686
return $this->scopeConfig->isSetFlag(
87-
static::XML_PATH_PRODUCT_USE_CATEGORIES,
87+
self::XML_PATH_PRODUCT_USE_CATEGORIES,
8888
ScopeInterface::SCOPE_STORE
8989
);
9090
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminFillCatalogProductsListWidgetTitleActionGroup">
12+
<annotations>
13+
<description>Fill catalog products list title field.</description>
14+
</annotations>
15+
16+
<arguments>
17+
<argument name="title" type="string" defaultValue=""/>
18+
</arguments>
19+
<waitForElementVisible selector="{{InsertWidgetSection.title}}" stepKey="waitForField"/>
20+
<fillField selector="{{InsertWidgetSection.title}}" userInput="{{title}}" stepKey="fillTitleField"/>
21+
</actionGroup>
22+
</actionGroups>
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="StorefrontAssertWidgetTitleActionGroup">
12+
<annotations>
13+
<description>Assert widget title on storefront.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="title" type="string"/>
17+
</arguments>
18+
19+
<grabTextFrom selector="{{StorefrontWidgetsSection.widgetProductsGrid}} {{StorefrontWidgetsSection.widgetTitle}}"
20+
stepKey="grabWidgetTitle"/>
21+
<assertEquals stepKey="assertWidgetTitle">
22+
<actualResult type="string">$grabWidgetTitle</actualResult>
23+
<expectedResult type="string">{{title}}</expectedResult>
24+
</assertEquals>
25+
</actionGroup>
26+
</actionGroups>

app/code/Magento/CatalogWidget/Test/Mftf/Section/CatalogWidgetSection/InsertWidgetSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,6 @@
1919
<element name="checkElementStorefrontByPrice" type="button" selector="//*[@class='product-items widget-product-grid']//*[contains(text(),'${{arg4}}.00')]" parameterized="true"/>
2020
<element name="checkElementStorefrontByName" type="button" selector="//*[@class='product-items widget-product-grid']//*[@class='product-item'][{{productPosition}}]//a[contains(text(), '{{productName}}')]" parameterized="true"/>
2121
<element name="categoryTreeWrapper" type="text" selector=".rule-chooser .tree.x-tree"/>
22+
<element name="title" type="text" selector="input[name='parameters[title]']"/>
2223
</section>
2324
</sections>
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="StoreFrontWidgetTitleWithReservedCharsTest">
11+
<annotations>
12+
<features value="Cms"/>
13+
<stories value="Create a CMS Page via the Admin when widget title contains reserved chairs"/>
14+
<title value="Create CMS Page via the Admin when widget title contains reserved chairs"/>
15+
<description value="See CMS Page title on store front page if titled widget with reserved chairs added"/>
16+
<severity value="MAJOR"/>
17+
<testCaseId value="MC-37419"/>
18+
<group value="Cms"/>
19+
<group value="WYSIWYGDisabled"/>
20+
</annotations>
21+
<before>
22+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
23+
<createData entity="simpleProductWithoutCategory" stepKey="createSimpleProductWithoutCategory"/>
24+
<createData entity="_defaultCmsPage" stepKey="createCmsPage"/>
25+
</before>
26+
<after>
27+
<deleteData createDataKey="createSimpleProductWithoutCategory" stepKey="deleteProduct"/>
28+
<deleteData createDataKey="createCmsPage" stepKey="deleteCmsPage" />
29+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
30+
</after>
31+
<!--Navigate to Page in Admin-->
32+
<actionGroup ref="NavigateToCreatedCMSPageActionGroup" stepKey="navigateToCreatedCMSPage">
33+
<argument name="CMSPage" value="$createCmsPage$"/>
34+
</actionGroup>
35+
<!--Insert widget-->
36+
<actionGroup ref="AdminInsertWidgetToCmsPageContentActionGroup" stepKey="insertWidgetToCmsPageContent">
37+
<argument name="widgetType" value="Catalog Products List"/>
38+
</actionGroup>
39+
<!--Fill widget title and save-->
40+
<actionGroup ref="AdminFillCatalogProductsListWidgetTitleActionGroup" stepKey="fillWidgetTitle">
41+
<argument name="title" value="Tittle }}"/>
42+
</actionGroup>
43+
<actionGroup ref="AdminClickInsertWidgetActionGroup" stepKey="clickInsertWidgetButton"/>
44+
<actionGroup ref="SaveCmsPageActionGroup" stepKey="saveOpenedPage"/>
45+
<!--Verify data on frontend-->
46+
<actionGroup ref="StorefrontGoToCMSPageActionGroup" stepKey="navigateToPageOnStorefront">
47+
<argument name="identifier" value="$createCmsPage.identifier$"/>
48+
</actionGroup>
49+
<actionGroup ref="StorefrontAssertWidgetTitleActionGroup" stepKey="verifyPageDataOnFrontend">
50+
<argument name="title" value="Tittle }}"/>
51+
</actionGroup>
52+
</test>
53+
</tests>

app/code/Magento/ConfigurableProduct/Block/Product/View/Type/Configurable.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,11 @@ protected function getOptionPrices()
303303

304304
$prices[$product->getId()] =
305305
[
306+
'baseOldPrice' => [
307+
'amount' => $this->localeFormat->getNumber(
308+
$priceInfo->getPrice('regular_price')->getAmount()->getBaseAmount()
309+
),
310+
],
306311
'oldPrice' => [
307312
'amount' => $this->localeFormat->getNumber(
308313
$priceInfo->getPrice('regular_price')->getAmount()->getValue()

app/code/Magento/ConfigurableProduct/Model/Product/Type/Configurable/Variations/Prices.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ public function getFormattedPrices(\Magento\Framework\Pricing\PriceInfo\Base $pr
3939
$finalPrice = $priceInfo->getPrice('final_price');
4040

4141
return [
42+
'baseOldPrice' => [
43+
'amount' => $this->localeFormat->getNumber($regularPrice->getAmount()->getBaseAmount()),
44+
],
4245
'oldPrice' => [
4346
'amount' => $this->localeFormat->getNumber($regularPrice->getAmount()->getValue()),
4447
],

app/code/Magento/ConfigurableProduct/Test/Unit/Block/Product/View/Type/ConfigurableTest.php

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,11 @@ public function cacheKeyProvider(): array
254254
* @param string|null $priceCurrency
255255
* @param int|null $customerGroupId
256256
*/
257-
public function testGetCacheKeyInfo(array $expected, ?string $priceCurrency = null, ?int $customerGroupId = null)
258-
{
257+
public function testGetCacheKeyInfo(
258+
array $expected,
259+
?string $priceCurrency = null,
260+
?int $customerGroupId = null
261+
): void {
259262
$storeMock = $this->getMockBuilder(StoreInterface::class)
260263
->setMethods(['getCurrentCurrency'])
261264
->getMockForAbstractClass();
@@ -282,7 +285,7 @@ public function testGetCacheKeyInfo(array $expected, ?string $priceCurrency = nu
282285
/**
283286
* Check that getJsonConfig() method returns expected value
284287
*/
285-
public function testGetJsonConfig()
288+
public function testGetJsonConfig(): void
286289
{
287290
$productId = 1;
288291
$amount = 10.50;
@@ -347,6 +350,9 @@ public function testGetJsonConfig()
347350
->with($priceInfoMock)
348351
->willReturn(
349352
[
353+
'baseOldPrice' => [
354+
'amount' => $amount,
355+
],
350356
'oldPrice' => [
351357
'amount' => $amount,
352358
],
@@ -386,6 +392,9 @@ private function getExpectedArray($productId, $amount, $priceQty, $percentage):
386392
'currencyFormat' => '%s',
387393
'optionPrices' => [
388394
$productId => [
395+
'baseOldPrice' => [
396+
'amount' => $amount,
397+
],
389398
'oldPrice' => [
390399
'amount' => $amount,
391400
],
@@ -403,12 +412,15 @@ private function getExpectedArray($productId, $amount, $priceQty, $percentage):
403412
],
404413
],
405414
'msrpPrice' => [
406-
'amount' => null ,
415+
'amount' => null,
407416
]
408417
],
409418
],
410419
'priceFormat' => [],
411420
'prices' => [
421+
'baseOldPrice' => [
422+
'amount' => $amount,
423+
],
412424
'oldPrice' => [
413425
'amount' => $amount,
414426
],
@@ -434,7 +446,7 @@ private function getExpectedArray($productId, $amount, $priceQty, $percentage):
434446
* @param MockObject $productMock
435447
* @return MockObject
436448
*/
437-
private function getProductTypeMock(MockObject $productMock)
449+
private function getProductTypeMock(MockObject $productMock): MockObject
438450
{
439451
$currencyMock = $this->getMockBuilder(Currency::class)
440452
->disableOriginalConstructor()

0 commit comments

Comments
 (0)