Skip to content

Commit 9d30672

Browse files
committed
Merge branch '2.2-develop' of https://github.com/magento/magento2 into 2.2-develop
2 parents 2db9186 + 1795f67 commit 9d30672

File tree

827 files changed

+9189
-907
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

827 files changed

+9189
-907
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3349,7 +3349,7 @@ Tests:
33493349
* [#686](https://github.com/magento/magento2/issues/686) -- Product save validation errors in the admin don't hide the overlay
33503350
* [#702](https://github.com/magento/magento2/issues/702) -- Base table or view not found
33513351
* [#652](https://github.com/magento/magento2/issues/652) -- Multishipping checkout not to change the Billing address js issue
3352-
* [#648](https://github.com/magento/magento2/issues/648) -- An equal (=) sign in the hash of the product page to to break the tabs functionality
3352+
* [#648](https://github.com/magento/magento2/issues/648) -- An equal (=) sign in the hash of the product page to break the tabs functionality
33533353
* Service Contracts:
33543354
* Refactored usage of new API of the Customer module
33553355
* Implemented Service Contracts for the Sales module

app/code/Magento/AdminNotification/Test/Unit/Model/System/Message/CacheOutdatedTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ public function testGetIdentity($expectedSum, $cacheTypes)
6262
$this->assertEquals($expectedSum, $this->_messageModel->getIdentity());
6363
}
6464

65+
/**
66+
* @return array
67+
*/
6568
public function getIdentityDataProvider()
6669
{
6770
$cacheTypeMock1 = $this->createPartialMock(\stdClass::class, ['getCacheType']);
@@ -95,6 +98,9 @@ public function testIsDisplayed($expected, $allowed, $cacheTypes)
9598
$this->assertEquals($expected, $this->_messageModel->isDisplayed());
9699
}
97100

101+
/**
102+
* @return array
103+
*/
98104
public function isDisplayedDataProvider()
99105
{
100106
$cacheTypesMock = $this->createPartialMock(\stdClass::class, ['getCacheType']);

app/code/Magento/AdminNotification/Test/Unit/Model/System/Message/Media/Synchronization/ErrorTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ public function testIsDisplayed($expectedFirstRun, $data)
7272
$this->assertEquals($expectedFirstRun, $model->isDisplayed());
7373
}
7474

75+
/**
76+
* @return array
77+
*/
7578
public function isDisplayedDataProvider()
7679
{
7780
return [

app/code/Magento/AdminNotification/Test/Unit/Model/System/Message/SecurityTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ public function testIsDisplayed($expectedResult, $cached, $response)
7676
$this->assertEquals($expectedResult, $this->_messageModel->isDisplayed());
7777
}
7878

79+
/**
80+
* @return array
81+
*/
7982
public function isDisplayedDataProvider()
8083
{
8184
return [

app/code/Magento/AdminNotification/view/adminhtml/templates/system/messages/popup.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
{
2424
"[data-role=system_messages_list]": {
2525
"Magento_AdminNotification/js/system/messages/popup": {
26-
class: 'modal-system-messages ui-popup-message'
26+
"class":"modal-system-messages ui-popup-message"
2727
}
2828
}
2929
}
Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
11
/**
22
* Copyright © Magento, Inc. All rights reserved.
33
* See COPYING.txt for license details.
4-
*/
4+
*/
55

66
define([
77
'jquery',
88
'Magento_Ui/js/modal/modal'
9-
], function ($) {
9+
], function ($, modal) {
1010
'use strict';
1111

1212
return function (data, element) {
13-
if (this.modal) {
14-
this.modal.html($(element).html());
13+
14+
if (modal.modal) {
15+
modal.modal.html($(element).html());
1516
} else {
16-
this.modal = $(element).modal({
17+
modal.modal = $(element).modal({
1718
modalClass: data.class,
1819
type: 'popup',
1920
buttons: []
2021
});
2122
}
22-
this.modal.modal('openModal');
23+
24+
modal.modal.modal('openModal');
2325
};
2426
});

app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Export/AdvancedPricingTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ protected function setUp()
213213
'_getCustomerGroupById',
214214
'correctExportData'
215215
]);
216-
$this->advancedPricing = $this->getMockbuilder(
216+
$this->advancedPricing = $this->getMockBuilder(
217217
\Magento\AdvancedPricingImportExport\Model\Export\AdvancedPricing::class
218218
)
219219
->setMethods($mockMethods)

app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricing/Validator/TierPriceTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,9 @@ public function testIsValidAddMessagesCall($value, $hasEmptyColumns, $customerGr
181181
$this->tierPrice->isValid($value);
182182
}
183183

184+
/**
185+
* @return array
186+
*/
184187
public function isValidResultFalseDataProvider()
185188
{
186189
return [
@@ -286,6 +289,9 @@ public function isValidResultFalseDataProvider()
286289
];
287290
}
288291

292+
/**
293+
* @return array
294+
*/
289295
public function isValidAddMessagesCallDataProvider()
290296
{
291297
return [

app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricing/Validator/WebsiteTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,9 @@ public function testGetAllWebsitesValue()
114114
$this->assertEquals($expectedResult, $result);
115115
}
116116

117+
/**
118+
* @return array
119+
*/
117120
public function isValidReturnDataProvider()
118121
{
119122
return [

app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricing/ValidatorTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ public function testInit()
7777
$this->validator->init(null);
7878
}
7979

80+
/**
81+
* @return array
82+
*/
8083
public function isValidDataProvider()
8184
{
8285
return [

app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricingTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -768,6 +768,9 @@ public function testSaveProductPrices($priceData, $oldSkus, $priceIn, $callNum)
768768
$this->invokeMethod($this->advancedPricing, 'saveProductPrices', [$priceData, 'table']);
769769
}
770770

771+
/**
772+
* @return array
773+
*/
771774
public function saveProductPricesDataProvider()
772775
{
773776
return [
@@ -839,6 +842,9 @@ public function testDeleteProductTierPrices(
839842
);
840843
}
841844

845+
/**
846+
* @return array
847+
*/
842848
public function deleteProductTierPricesDataProvider()
843849
{
844850
return [
@@ -921,6 +927,9 @@ public function testProcessCountExistingPrices(
921927
$this->invokeMethod($this->advancedPricing, 'processCountExistingPrices', [$prices, 'table']);
922928
}
923929

930+
/**
931+
* @return array
932+
*/
924933
public function processCountExistingPricesDataProvider()
925934
{
926935
return [

app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/AdditionalCommentTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@ public function testRender()
6565
->method('getLabel')
6666
->willReturn('Comment label');
6767
$html = $this->additionalComment->render($this->abstractElementMock);
68-
$this->assertRegexp(
68+
$this->assertRegExp(
6969
"/New comment/",
7070
$html
7171
);
72-
$this->assertRegexp(
72+
$this->assertRegExp(
7373
"/Comment label/",
7474
$html
7575
);

app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/CollectionTimeLabelTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function testRender()
7373
$this->abstractElementMock->expects($this->any())
7474
->method('getComment')
7575
->willReturn('Eastern Standard Time (America/New_York)');
76-
$this->assertRegexp(
76+
$this->assertRegExp(
7777
"/Eastern Standard Time \(America\/New_York\)/",
7878
$this->collectionTimeLabel->render($this->abstractElementMock)
7979
);

app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/SubscriptionStatusLabelTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public function testRender()
7777
$this->abstractElementMock->expects($this->any())
7878
->method('getComment')
7979
->willReturn('Subscription status: Enabled');
80-
$this->assertRegexp(
80+
$this->assertRegExp(
8181
"/Subscription status: Enabled/",
8282
$this->subscriptionStatusLabel->render($this->abstractElementMock)
8383
);

app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/VerticalTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function testRender()
6565
->method('getHint')
6666
->willReturn('New hint');
6767
$html = $this->vertical->render($this->abstractElementMock);
68-
$this->assertRegexp(
68+
$this->assertRegExp(
6969
"/New comment/",
7070
$html
7171
);

app/code/Magento/Analytics/Test/Unit/ReportXml/QueryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ protected function setUp()
4949
->disableOriginalConstructor()
5050
->getMock();
5151

52-
$this->selectHydratorMock = $this->getMockBuilder(selectHydrator::class)
52+
$this->selectHydratorMock = $this->getMockBuilder(SelectHydrator::class)
5353
->disableOriginalConstructor()
5454
->getMock();
5555

app/code/Magento/Authorization/Test/Unit/Model/Acl/AclRetrieverTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ public function testGetAllowedResourcesByUser()
7878
);
7979
}
8080

81+
/**
82+
* @return AclRetriever
83+
*/
8184
protected function createAclRetriever()
8285
{
8386
$this->roleMock = $this->createPartialMock(\Magento\Authorization\Model\Role::class, ['getId', '__wakeup']);

app/code/Magento/Authorizenet/Model/Directpost.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -814,10 +814,14 @@ protected function declineOrder(\Magento\Sales\Model\Order $order, $message = ''
814814
{
815815
try {
816816
$response = $this->getResponse();
817-
if ($voidPayment && $response->getXTransId() && strtoupper($response->getXType())
818-
== self::REQUEST_TYPE_AUTH_ONLY
817+
if ($voidPayment
818+
&& $response->getXTransId()
819+
&& strtoupper($response->getXType()) == self::REQUEST_TYPE_AUTH_ONLY
819820
) {
820-
$order->getPayment()->setTransactionId(null)->setParentTransactionId($response->getXTransId())->void();
821+
$order->getPayment()
822+
->setTransactionId(null)
823+
->setParentTransactionId($response->getXTransId())
824+
->void($response);
821825
}
822826
$order->registerCancellation($message)->save();
823827
} catch (\Exception $e) {

app/code/Magento/Authorizenet/Test/Unit/Model/Directpost/ResponseTest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ public function testGenerateHash($merchantMd5, $merchantApiLogin, $amount, $amou
3737
);
3838
}
3939

40+
/**
41+
* @return array
42+
*/
4043
public function generateHashDataProvider()
4144
{
4245
return [
@@ -57,6 +60,14 @@ public function generateHashDataProvider()
5760
];
5861
}
5962

63+
/**
64+
* @param $merchantMd5
65+
* @param $merchantApiLogin
66+
* @param $amount
67+
* @param $transactionId
68+
*
69+
* @return string
70+
*/
6071
protected function generateHash($merchantMd5, $merchantApiLogin, $amount, $transactionId)
6172
{
6273
return strtoupper(md5($merchantMd5 . $merchantApiLogin . $transactionId . $amount));

app/code/Magento/Backend/Test/Unit/App/Action/Plugin/AuthenticationTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,9 @@ public function testProcessNotLoggedInUser($isIFrameParam, $isAjaxParam, $isForw
146146
$this->assertEquals($expectedResult, $this->plugin->aroundDispatch($subject, $proceed, $request));
147147
}
148148

149+
/**
150+
* @return array
151+
*/
149152
public function processNotLoggedInUserDataProvider()
150153
{
151154
return [

app/code/Magento/Backend/Test/Unit/App/Action/Plugin/MassactionKeyTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ public function testBeforeDispatchWhenMassactionPrepareKeyRequestExists($postDat
7474
$this->plugin->beforeDispatch($this->subjectMock, $this->requestMock);
7575
}
7676

77+
/**
78+
* @return array
79+
*/
7780
public function beforeDispatchDataProvider()
7881
{
7982
return [

app/code/Magento/Backend/Test/Unit/App/Action/Stub/ActionStub.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88

99
class ActionStub extends \Magento\Backend\App\Action
1010
{
11+
/**
12+
* @return \Magento\Framework\App\ResponseInterface|\Magento\Framework\Controller\ResultInterface|void
13+
*/
1114
public function execute()
1215
{
1316
// Empty method stub for test

app/code/Magento/Backend/Test/Unit/App/Area/FrontNameResolverTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ public function testIsHostBackend($url, $host, $useCustomAdminUrl, $customAdminU
118118
$this->assertEquals($this->model->isHostBackend(), $expectedValue);
119119
}
120120

121+
/**
122+
* @return array
123+
*/
121124
public function hostsDataProvider()
122125
{
123126
return [

app/code/Magento/Backend/Test/Unit/App/ConfigTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ public function testIsSetFlag($configPath, $configValue, $expectedResult)
7070
$this->assertEquals($expectedResult, $this->model->isSetFlag($configPath));
7171
}
7272

73+
/**
74+
* @return array
75+
*/
7376
public function isSetFlagDataProvider()
7477
{
7578
return [

app/code/Magento/Backend/Test/Unit/Block/AnchorRendererTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,9 @@ public function testRenderAnchorLevelIsNotOne($hasTarget)
141141
);
142142
}
143143

144+
/**
145+
* @return array
146+
*/
144147
public function targetDataProvider()
145148
{
146149
return [

app/code/Magento/Backend/Test/Unit/Block/Cache/AdditionalTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ public function testIsInProductionMode($mode, $expected)
8888
$this->assertEquals($expected, $this->additonalBlock->isInProductionMode());
8989
}
9090

91+
/**
92+
* @return array
93+
*/
9194
public function isInProductionModeDataProvider()
9295
{
9396
return [

app/code/Magento/Backend/Test/Unit/Block/GlobalSearchTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ public function testGetEntitiesToShow(array $results, int $expectedEntitiesQty)
103103
$this->assertSame($expectedEntitiesQty, count($this->globalSearch->getEntitiesToShow()));
104104
}
105105

106+
/**
107+
* @return array
108+
*/
106109
public function getEntitiesToShowDataProvider()
107110
{
108111
return [

app/code/Magento/Backend/Test/Unit/Block/MenuItemCheckerTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ public function testIsItemActiveLevelNotZero()
7474
);
7575
}
7676

77+
/**
78+
* @return array
79+
*/
7780
public function dataProvider()
7881
{
7982
return [

app/code/Magento/Backend/Test/Unit/Block/Widget/ButtonTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ public function testGetAttributesHtml($data, $expect)
6161
$this->assertRegExp($expect, $attributes);
6262
}
6363

64+
/**
65+
* @return array
66+
*/
6467
public function getAttributesHtmlDataProvider()
6568
{
6669
return [

app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/Column/Renderer/Radio/ExtendedTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ public function testRender(array $rowData, $expectedResult)
5454
$this->assertEquals($expectedResult, $this->_object->render(new \Magento\Framework\DataObject($rowData)));
5555
}
5656

57+
/**
58+
* @return array
59+
*/
5760
public function renderDataProvider()
5861
{
5962
return [

app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/Column/Renderer/RadioTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ public function testRender(array $rowData, $expectedResult)
6363
$this->assertEquals($expectedResult, $this->_object->render(new \Magento\Framework\DataObject($rowData)));
6464
}
6565

66+
/**
67+
* @return array
68+
*/
6669
public function renderDataProvider()
6770
{
6871
return [

0 commit comments

Comments
 (0)