Skip to content

Commit f112a05

Browse files
[EngCom] Public Pull Requests - 2.3-develop
- merged latest code from mainline branch
2 parents f804b7c + 250045e commit f112a05

File tree

20 files changed

+139
-50
lines changed

20 files changed

+139
-50
lines changed

app/code/Magento/Catalog/Controller/Adminhtml/Product/GridOnly.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
<?php
22
/**
3-
*
43
* Copyright © Magento, Inc. All rights reserved.
54
* See COPYING.txt for license details.
65
*/
76
namespace Magento\Catalog\Controller\Adminhtml\Product;
87

9-
class GridOnly extends \Magento\Catalog\Controller\Adminhtml\Product
8+
use Magento\Framework\App\Action\HttpGetActionInterface;
9+
10+
/**
11+
* Get specified tab grid controller.
12+
*/
13+
class GridOnly extends \Magento\Catalog\Controller\Adminhtml\Product implements HttpGetActionInterface
1014
{
1115
/**
1216
* @var \Magento\Framework\Controller\Result\RawFactory
@@ -47,7 +51,7 @@ public function execute()
4751
$this->productBuilder->build($this->getRequest());
4852

4953
$block = $this->getRequest()->getParam('gridOnlyBlock');
50-
$blockClassSuffix = str_replace(' ', '_', ucwords(str_replace('_', ' ', $block)));
54+
$blockClassSuffix = ucwords($block, '_');
5155

5256
/** @var \Magento\Framework\Controller\Result\Raw $resultRaw */
5357
$resultRaw = $this->resultRawFactory->create();

app/code/Magento/CatalogUrlRewrite/Test/Unit/Model/Category/CurrentUrlRewritesRegeneratorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ protected function getCurrentRewritesMocks($currentRewrites)
252252
->disableOriginalConstructor()->getMock();
253253
foreach ($urlRewrite as $key => $value) {
254254
$url->expects($this->any())
255-
->method('get' . str_replace(' ', '', ucwords(str_replace('_', ' ', $key))))
255+
->method('get' . str_replace('_', '', ucwords($key, '_')))
256256
->will($this->returnValue($value));
257257
}
258258
$rewrites[] = $url;

app/code/Magento/CatalogUrlRewrite/Test/Unit/Model/Product/CurrentUrlRewritesRegeneratorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ protected function getCurrentRewritesMocks($currentRewrites)
294294
->disableOriginalConstructor()->getMock();
295295
foreach ($urlRewrite as $key => $value) {
296296
$url->expects($this->any())
297-
->method('get' . str_replace(' ', '', ucwords(str_replace('_', ' ', $key))))
297+
->method('get' . str_replace('_', '', ucwords($key, '_')))
298298
->will($this->returnValue($value));
299299
}
300300
$rewrites[] = $url;

app/code/Magento/CatalogUrlRewrite/Test/Unit/Observer/AfterImportDataObserverTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@ protected function currentUrlRewritesRegeneratorGetCurrentRewritesMocks($current
694694
->disableOriginalConstructor()->getMock();
695695
foreach ($urlRewrite as $key => $value) {
696696
$url->expects($this->any())
697-
->method('get' . str_replace(' ', '', ucwords(str_replace('_', ' ', $key))))
697+
->method('get' . str_replace('_', '', ucwords($key, '_')))
698698
->will($this->returnValue($value));
699699
}
700700
$rewrites[] = $url;

app/code/Magento/Config/Model/Config.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,11 @@ protected function _processGroup(
424424
if (!isset($fieldData['value'])) {
425425
$fieldData['value'] = null;
426426
}
427+
428+
if ($field->getType() == 'multiline' && is_array($fieldData['value'])) {
429+
$fieldData['value'] = trim(implode(PHP_EOL, $fieldData['value']));
430+
}
431+
427432
$data = [
428433
'field' => $fieldId,
429434
'groups' => $groups,

app/code/Magento/Sales/Model/Order/Email/SenderBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ protected function configureEmailTemplate()
106106
$this->transportBuilder->setTemplateIdentifier($this->templateContainer->getTemplateId());
107107
$this->transportBuilder->setTemplateOptions($this->templateContainer->getTemplateOptions());
108108
$this->transportBuilder->setTemplateVars($this->templateContainer->getTemplateVars());
109-
$this->transportBuilder->setFromByStore(
109+
$this->transportBuilder->setFromByScope(
110110
$this->identityContainer->getEmailIdentity(),
111111
$this->identityContainer->getStore()->getId()
112112
);

app/code/Magento/Sales/Test/Unit/Model/Order/Email/SenderBuilderTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ protected function setUp()
7676
'setTemplateIdentifier',
7777
'setTemplateOptions',
7878
'setTemplateVars',
79-
'setFromByStore',
79+
'setFromByScope',
8080
]
8181
);
8282

@@ -103,7 +103,7 @@ protected function setUp()
103103
->method('getEmailIdentity')
104104
->will($this->returnValue($emailIdentity));
105105
$this->transportBuilder->expects($this->once())
106-
->method('setFromByStore')
106+
->method('setFromByScope')
107107
->with($this->equalTo($emailIdentity), 1);
108108

109109
$this->identityContainerMock->expects($this->once())
@@ -146,7 +146,7 @@ public function testSend()
146146
->method('getId')
147147
->willReturn(1);
148148
$this->transportBuilder->expects($this->once())
149-
->method('setFromByStore')
149+
->method('setFromByScope')
150150
->with($identity, 1);
151151
$this->transportBuilder->expects($this->once())
152152
->method('addTo')
@@ -176,7 +176,7 @@ public function testSendCopyTo()
176176
->method('addTo')
177177
->with($this->equalTo('example@mail.com'));
178178
$this->transportBuilder->expects($this->once())
179-
->method('setFromByStore')
179+
->method('setFromByScope')
180180
->with($identity, 1);
181181
$this->identityContainerMock->expects($this->once())
182182
->method('getStore')

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ private function getTaxRateMock(array $taxRateData)
252252
foreach ($taxRateData as $key => $value) {
253253
// convert key from snake case to upper case
254254
$taxRateMock->expects($this->any())
255-
->method('get' . str_replace(' ', '', ucwords(str_replace('_', ' ', $key))))
255+
->method('get' . str_replace('_', '', ucwords($key, '_')))
256256
->will($this->returnValue($value));
257257
}
258258

app/code/Magento/Tax/Test/Unit/Model/Sales/Total/Quote/ShippingTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ private function getMockObject($className, array $objectState)
133133
$getterValueMap = [];
134134
$methods = ['__wakeup'];
135135
foreach ($objectState as $key => $value) {
136-
$getterName = 'get' . str_replace(' ', '', ucwords(str_replace('_', ' ', $key)));
136+
$getterName = 'get' . str_replace('_', '', ucwords($key, '_'));
137137
$getterValueMap[$getterName] = $value;
138138
$methods[] = $getterName;
139139
}

dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Fixture/CatalogSearchQuery/QueryText.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ private function createProducts(FixtureFactory $fixtureFactory, $productsData)
6161
$searchValue = isset($productData[2]) ? $productData[2] : $productData[1];
6262
if ($this->data === null) {
6363
if ($product->hasData($searchValue)) {
64-
$getProperty = 'get' . str_replace(' ', '', ucwords(str_replace('_', ' ', $searchValue)));
64+
$getProperty = 'get' . str_replace('_', '', ucwords($searchValue, '_'));
6565
$this->data = $product->$getProperty();
6666
} else {
6767
$this->data = $searchValue;

0 commit comments

Comments
 (0)