Skip to content

Commit b583ee7

Browse files
author
Valeriy Nayda
committed
Merge remote-tracking branch 'origin/2.3-develop' into product-url-rewrites
2 parents d6d0872 + 6200e46 commit b583ee7

File tree

2,777 files changed

+25168
-15872
lines changed

Some content is hidden

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

2,777 files changed

+25168
-15872
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ To learn more about issue gate labels click [here](https://github.com/magento/ma
5858

5959
<h2>Reporting security issues</h2>
6060

61-
To report security vulnerabilities in Magento software or web sites, please e-mail <a href="mailto:[email protected]">[email protected]</a>. Please do not report security issues using GitHub. Be sure to encrypt your e-mail with our <a href="https://info2.magento.com/rs/magentoenterprise/images/security_at_magento.asc">encryption key</a> if it includes sensitive information. Learn more about reporting security issues <a href="https://magento.com/security/reporting-magento-security-issue">here</a>.
61+
To report security vulnerabilities in Magento software or web sites, please create a Bugcrowd researcher account <a href="https://bugcrowd.com/magento">there</a> to submit and follow-up your issue. Learn more about reporting security issues <a href="https://magento.com/security/reporting-magento-security-issue">here</a>.
6262

6363
Stay up-to-date on the latest security news and patches for Magento by signing up for <a href="https://magento.com/security/sign-up">Security Alert Notifications</a>.
6464

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Admin Notification Functional Tests
2+
3+
The Functional Test Module for **Magento Admin Notification** module.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"name": "magento/functional-test-module-admin-notification",
3+
"description": "N/A",
4+
"config": {
5+
"sort-packages": true
6+
},
7+
"require": {
8+
"php": "~7.1.3||~7.2.0",
9+
"magento/magento2-functional-testing-framework": "2.2.0",
10+
"magento/functional-test-module-backend": "100.0.0-dev",
11+
"magento/functional-test-module-media-storage": "100.0.0-dev",
12+
"magento/functional-test-module-store": "100.0.0-dev",
13+
"magento/functional-test-module-ui": "100.0.0-dev"
14+
},
15+
"type": "magento2-test",
16+
"license": [
17+
"OSL-3.0",
18+
"AFL-3.0"
19+
]
20+
}

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/AdvancedPricingImportExport/Model/Export/AdvancedPricing.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ class AdvancedPricing extends \Magento\CatalogImportExport\Model\Export\Product
104104
* @param \Magento\CatalogImportExport\Model\Export\RowCustomizerInterface $rowCustomizer
105105
* @param ImportProduct\StoreResolver $storeResolver
106106
* @param \Magento\Customer\Api\GroupRepositoryInterface $groupRepository
107-
* @throws \Magento\Framework\Exception\LocalizedException
108107
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
109108
*/
110109
public function __construct(
@@ -193,6 +192,7 @@ protected function initTypeModels()
193192
* Export process
194193
*
195194
* @return string
195+
* @throws \Magento\Framework\Exception\LocalizedException
196196
*/
197197
public function export()
198198
{
@@ -586,8 +586,8 @@ protected function getTierPrices(array $listSku, $table)
586586
* Get Website code.
587587
*
588588
* @param int $websiteId
589-
*
590589
* @return string
590+
* @throws \Magento\Framework\Exception\LocalizedException
591591
*/
592592
protected function _getWebsiteCode(int $websiteId): string
593593
{
@@ -617,8 +617,9 @@ protected function _getWebsiteCode(int $websiteId): string
617617
*
618618
* @param int $groupId
619619
* @param int $allGroups
620-
*
621620
* @return string
621+
* @throws \Magento\Framework\Exception\LocalizedException
622+
* @throws \Magento\Framework\Exception\NoSuchEntityException
622623
*/
623624
protected function _getCustomerGroupById(
624625
int $groupId,

app/code/Magento/AdvancedPricingImportExport/Model/Import/AdvancedPricing.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
use Magento\CatalogImportExport\Model\Import\Product as ImportProduct;
99
use Magento\CatalogImportExport\Model\Import\Product\RowValidatorInterface as ValidatorInterface;
1010
use Magento\ImportExport\Model\Import\ErrorProcessing\ProcessingErrorAggregatorInterface;
11-
use Magento\Framework\App\ResourceConnection;
1211

1312
/**
1413
* Class AdvancedPricing
@@ -618,6 +617,7 @@ protected function processCountNewPrices(array $tierPrices)
618617
* Get product entity link field
619618
*
620619
* @return string
620+
* @throws \Exception
621621
*/
622622
private function getProductEntityLinkField()
623623
{

app/code/Magento/AdvancedPricingImportExport/Model/Import/AdvancedPricing/Validator.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ public function __construct($validators = [])
2828
*
2929
* @param array $value
3030
* @return bool
31+
* @throws \Zend_Validate_Exception
3132
*/
3233
public function isValid($value)
3334
{
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Advanced Pricing Import Export Functional Tests
2+
3+
The Functional Test Module for **Magento Advanced Pricing Import Export** module.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "magento/functional-test-module-advanced-pricing-import-export",
3+
"description": "N/A",
4+
"config": {
5+
"sort-packages": true
6+
},
7+
"require": {
8+
"php": "~7.1.3||~7.2.0",
9+
"magento/magento2-functional-testing-framework": "2.2.0",
10+
"magento/functional-test-module-catalog": "100.0.0-dev",
11+
"magento/functional-test-module-catalog-import-export": "100.0.0-dev",
12+
"magento/functional-test-module-catalog-inventory": "100.0.0-dev",
13+
"magento/functional-test-module-customer": "100.0.0-dev",
14+
"magento/functional-test-module-eav": "100.0.0-dev",
15+
"magento/functional-test-module-import-export": "100.0.0-dev",
16+
"magento/functional-test-module-store": "100.0.0-dev"
17+
},
18+
"type": "magento2-test",
19+
"license": [
20+
"OSL-3.0",
21+
"AFL-3.0"
22+
]
23+
}

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

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,13 @@ protected function setUp()
151151
]
152152
);
153153
$this->exportConfig = $this->createMock(\Magento\ImportExport\Model\Export\Config::class);
154-
$this->productFactory = $this->createPartialMock(\Magento\Catalog\Model\ResourceModel\ProductFactory::class, [
154+
$this->productFactory = $this->createPartialMock(
155+
\Magento\Catalog\Model\ResourceModel\ProductFactory::class,
156+
[
155157
'create',
156158
'getTypeId',
157-
]);
159+
]
160+
);
158161
$this->attrSetColFactory = $this->createPartialMock(
159162
\Magento\Eav\Model\ResourceModel\Entity\Attribute\Set\CollectionFactory::class,
160163
[
@@ -185,11 +188,14 @@ protected function setUp()
185188
\Magento\CatalogImportExport\Model\Import\Product\StoreResolver::class
186189
);
187190
$this->groupRepository = $this->createMock(\Magento\Customer\Api\GroupRepositoryInterface::class);
188-
$this->writer = $this->createPartialMock(\Magento\ImportExport\Model\Export\Adapter\AbstractAdapter::class, [
189-
'setHeaderCols',
190-
'writeRow',
191-
'getContents',
192-
]);
191+
$this->writer = $this->createPartialMock(
192+
\Magento\ImportExport\Model\Export\Adapter\AbstractAdapter::class,
193+
[
194+
'setHeaderCols',
195+
'writeRow',
196+
'getContents',
197+
]
198+
);
193199
$constructorMethods = [
194200
'initTypeModels',
195201
'initAttributes',
@@ -213,7 +219,7 @@ protected function setUp()
213219
'_getCustomerGroupById',
214220
'correctExportData'
215221
]);
216-
$this->advancedPricing = $this->getMockbuilder(
222+
$this->advancedPricing = $this->getMockBuilder(
217223
\Magento\AdvancedPricingImportExport\Model\Export\AdvancedPricing::class
218224
)
219225
->setMethods($mockMethods)
@@ -347,6 +353,7 @@ protected function tearDown()
347353
* @param $object
348354
* @param $property
349355
* @return mixed
356+
* @throws \ReflectionException
350357
*/
351358
protected function getPropertyValue($object, $property)
352359
{
@@ -362,6 +369,8 @@ protected function getPropertyValue($object, $property)
362369
* @param $object
363370
* @param $property
364371
* @param $value
372+
* @return mixed
373+
* @throws \ReflectionException
365374
*/
366375
protected function setPropertyValue(&$object, $property, $value)
367376
{

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

Lines changed: 8 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 [
@@ -340,6 +346,7 @@ public function isValidAddMessagesCallDataProvider()
340346
* @param object $object
341347
* @param string $property
342348
* @return mixed
349+
* @throws \ReflectionException
343350
*/
344351
protected function getPropertyValue($object, $property)
345352
{
@@ -357,6 +364,7 @@ protected function getPropertyValue($object, $property)
357364
* @param string $property
358365
* @param mixed $value
359366
* @return object
367+
* @throws \ReflectionException
360368
*/
361369
protected function setPropertyValue(&$object, $property, $value)
362370
{

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: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,10 @@ public function testGetEntityTypeCode()
209209
* Test method validateRow against its result.
210210
*
211211
* @dataProvider validateRowResultDataProvider
212+
* @param array $rowData
213+
* @param string|null $behavior
214+
* @param bool $expectedResult
215+
* @throws \ReflectionException
212216
*/
213217
public function testValidateRowResult($rowData, $behavior, $expectedResult)
214218
{
@@ -234,6 +238,10 @@ public function testValidateRowResult($rowData, $behavior, $expectedResult)
234238
* Test method validateRow whether AddRowError is called.
235239
*
236240
* @dataProvider validateRowAddRowErrorCallDataProvider
241+
* @param array $rowData
242+
* @param string|null $behavior
243+
* @param string $error
244+
* @throws \ReflectionException
237245
*/
238246
public function testValidateRowAddRowErrorCall($rowData, $behavior, $error)
239247
{
@@ -324,6 +332,13 @@ public function testSaveAdvancedPricing()
324332
* Take into consideration different data and check relative internal calls.
325333
*
326334
* @dataProvider saveAndReplaceAdvancedPricesAppendBehaviourDataProvider
335+
* @param array $data
336+
* @param string $tierCustomerGroupId
337+
* @param string $groupCustomerGroupId
338+
* @param string $tierWebsiteId
339+
* @param string $groupWebsiteId
340+
* @param array $expectedTierPrices
341+
* @throws \ReflectionException
327342
*/
328343
public function testSaveAndReplaceAdvancedPricesAppendBehaviourDataAndCalls(
329344
$data,
@@ -768,6 +783,9 @@ public function testSaveProductPrices($priceData, $oldSkus, $priceIn, $callNum)
768783
$this->invokeMethod($this->advancedPricing, 'saveProductPrices', [$priceData, 'table']);
769784
}
770785

786+
/**
787+
* @return array
788+
*/
771789
public function saveProductPricesDataProvider()
772790
{
773791
return [
@@ -839,6 +857,9 @@ public function testDeleteProductTierPrices(
839857
);
840858
}
841859

860+
/**
861+
* @return array
862+
*/
842863
public function deleteProductTierPricesDataProvider()
843864
{
844865
return [
@@ -921,6 +942,9 @@ public function testProcessCountExistingPrices(
921942
$this->invokeMethod($this->advancedPricing, 'processCountExistingPrices', [$prices, 'table']);
922943
}
923944

945+
/**
946+
* @return array
947+
*/
924948
public function processCountExistingPricesDataProvider()
925949
{
926950
return [
@@ -947,6 +971,7 @@ public function processCountExistingPricesDataProvider()
947971
* @param $object
948972
* @param $property
949973
* @return mixed
974+
* @throws \ReflectionException
950975
*/
951976
protected function getPropertyValue($object, $property)
952977
{
@@ -963,6 +988,8 @@ protected function getPropertyValue($object, $property)
963988
* @param $object
964989
* @param $property
965990
* @param $value
991+
* @return mixed
992+
* @throws \ReflectionException
966993
*/
967994
protected function setPropertyValue(&$object, $property, $value)
968995
{
@@ -980,8 +1007,8 @@ protected function setPropertyValue(&$object, $property, $value)
9801007
* @param object $object
9811008
* @param string $method
9821009
* @param array $args
983-
*
984-
* @return mixed the method result.
1010+
* @return mixed
1011+
* @throws \ReflectionException
9851012
*/
9861013
private function invokeMethod($object, $method, $args = [])
9871014
{
@@ -998,6 +1025,7 @@ private function invokeMethod($object, $method, $args = [])
9981025
* @param array $methods
9991026
*
10001027
* @return \PHPUnit_Framework_MockObject_MockObject
1028+
* @throws \ReflectionException
10011029
*/
10021030
private function getAdvancedPricingMock($methods = [])
10031031
{

app/code/Magento/AdvancedSearch/Block/SearchData.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ abstract class SearchData extends Template implements SearchDataInterface
3030
/**
3131
* @var string
3232
*/
33-
protected $_template = 'search_data.phtml';
33+
protected $_template = 'Magento_AdvancedSearch::search_data.phtml';
3434

3535
/**
3636
* @param Template\Context $context
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Advanced Search Functional Tests
2+
3+
The Functional Test Module for **Magento Advanced Search** module.

0 commit comments

Comments
 (0)