Skip to content

Commit

Permalink
Merge branch '2.3-develop' into product-url-rewrites
Browse files Browse the repository at this point in the history
  • Loading branch information
rogyar committed Jul 19, 2018
2 parents d6d0872 + 6200e46 commit 57c2e4c
Show file tree
Hide file tree
Showing 2,777 changed files with 25,168 additions and 15,872 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ To learn more about issue gate labels click [here](https://github.com/magento/ma

<h2>Reporting security issues</h2>

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>.
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>.

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>.

Expand Down
3 changes: 3 additions & 0 deletions app/code/Magento/AdminNotification/Test/Mftf/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Admin Notification Functional Tests

The Functional Test Module for **Magento Admin Notification** module.
20 changes: 20 additions & 0 deletions app/code/Magento/AdminNotification/Test/Mftf/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "magento/functional-test-module-admin-notification",
"description": "N/A",
"config": {
"sort-packages": true
},
"require": {
"php": "~7.1.3||~7.2.0",
"magento/magento2-functional-testing-framework": "2.2.0",
"magento/functional-test-module-backend": "100.0.0-dev",
"magento/functional-test-module-media-storage": "100.0.0-dev",
"magento/functional-test-module-store": "100.0.0-dev",
"magento/functional-test-module-ui": "100.0.0-dev"
},
"type": "magento2-test",
"license": [
"OSL-3.0",
"AFL-3.0"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ public function testGetIdentity($expectedSum, $cacheTypes)
$this->assertEquals($expectedSum, $this->_messageModel->getIdentity());
}

/**
* @return array
*/
public function getIdentityDataProvider()
{
$cacheTypeMock1 = $this->createPartialMock(\stdClass::class, ['getCacheType']);
Expand Down Expand Up @@ -95,6 +98,9 @@ public function testIsDisplayed($expected, $allowed, $cacheTypes)
$this->assertEquals($expected, $this->_messageModel->isDisplayed());
}

/**
* @return array
*/
public function isDisplayedDataProvider()
{
$cacheTypesMock = $this->createPartialMock(\stdClass::class, ['getCacheType']);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ public function testIsDisplayed($expectedFirstRun, $data)
$this->assertEquals($expectedFirstRun, $model->isDisplayed());
}

/**
* @return array
*/
public function isDisplayedDataProvider()
{
return [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ public function testIsDisplayed($expectedResult, $cached, $response)
$this->assertEquals($expectedResult, $this->_messageModel->isDisplayed());
}

/**
* @return array
*/
public function isDisplayedDataProvider()
{
return [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ class AdvancedPricing extends \Magento\CatalogImportExport\Model\Export\Product
* @param \Magento\CatalogImportExport\Model\Export\RowCustomizerInterface $rowCustomizer
* @param ImportProduct\StoreResolver $storeResolver
* @param \Magento\Customer\Api\GroupRepositoryInterface $groupRepository
* @throws \Magento\Framework\Exception\LocalizedException
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
*/
public function __construct(
Expand Down Expand Up @@ -193,6 +192,7 @@ protected function initTypeModels()
* Export process
*
* @return string
* @throws \Magento\Framework\Exception\LocalizedException
*/
public function export()
{
Expand Down Expand Up @@ -586,8 +586,8 @@ protected function getTierPrices(array $listSku, $table)
* Get Website code.
*
* @param int $websiteId
*
* @return string
* @throws \Magento\Framework\Exception\LocalizedException
*/
protected function _getWebsiteCode(int $websiteId): string
{
Expand Down Expand Up @@ -617,8 +617,9 @@ protected function _getWebsiteCode(int $websiteId): string
*
* @param int $groupId
* @param int $allGroups
*
* @return string
* @throws \Magento\Framework\Exception\LocalizedException
* @throws \Magento\Framework\Exception\NoSuchEntityException
*/
protected function _getCustomerGroupById(
int $groupId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
use Magento\CatalogImportExport\Model\Import\Product as ImportProduct;
use Magento\CatalogImportExport\Model\Import\Product\RowValidatorInterface as ValidatorInterface;
use Magento\ImportExport\Model\Import\ErrorProcessing\ProcessingErrorAggregatorInterface;
use Magento\Framework\App\ResourceConnection;

/**
* Class AdvancedPricing
Expand Down Expand Up @@ -618,6 +617,7 @@ protected function processCountNewPrices(array $tierPrices)
* Get product entity link field
*
* @return string
* @throws \Exception
*/
private function getProductEntityLinkField()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public function __construct($validators = [])
*
* @param array $value
* @return bool
* @throws \Zend_Validate_Exception
*/
public function isValid($value)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Advanced Pricing Import Export Functional Tests

The Functional Test Module for **Magento Advanced Pricing Import Export** module.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "magento/functional-test-module-advanced-pricing-import-export",
"description": "N/A",
"config": {
"sort-packages": true
},
"require": {
"php": "~7.1.3||~7.2.0",
"magento/magento2-functional-testing-framework": "2.2.0",
"magento/functional-test-module-catalog": "100.0.0-dev",
"magento/functional-test-module-catalog-import-export": "100.0.0-dev",
"magento/functional-test-module-catalog-inventory": "100.0.0-dev",
"magento/functional-test-module-customer": "100.0.0-dev",
"magento/functional-test-module-eav": "100.0.0-dev",
"magento/functional-test-module-import-export": "100.0.0-dev",
"magento/functional-test-module-store": "100.0.0-dev"
},
"type": "magento2-test",
"license": [
"OSL-3.0",
"AFL-3.0"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,13 @@ protected function setUp()
]
);
$this->exportConfig = $this->createMock(\Magento\ImportExport\Model\Export\Config::class);
$this->productFactory = $this->createPartialMock(\Magento\Catalog\Model\ResourceModel\ProductFactory::class, [
$this->productFactory = $this->createPartialMock(
\Magento\Catalog\Model\ResourceModel\ProductFactory::class,
[
'create',
'getTypeId',
]);
]
);
$this->attrSetColFactory = $this->createPartialMock(
\Magento\Eav\Model\ResourceModel\Entity\Attribute\Set\CollectionFactory::class,
[
Expand Down Expand Up @@ -185,11 +188,14 @@ protected function setUp()
\Magento\CatalogImportExport\Model\Import\Product\StoreResolver::class
);
$this->groupRepository = $this->createMock(\Magento\Customer\Api\GroupRepositoryInterface::class);
$this->writer = $this->createPartialMock(\Magento\ImportExport\Model\Export\Adapter\AbstractAdapter::class, [
'setHeaderCols',
'writeRow',
'getContents',
]);
$this->writer = $this->createPartialMock(
\Magento\ImportExport\Model\Export\Adapter\AbstractAdapter::class,
[
'setHeaderCols',
'writeRow',
'getContents',
]
);
$constructorMethods = [
'initTypeModels',
'initAttributes',
Expand All @@ -213,7 +219,7 @@ protected function setUp()
'_getCustomerGroupById',
'correctExportData'
]);
$this->advancedPricing = $this->getMockbuilder(
$this->advancedPricing = $this->getMockBuilder(
\Magento\AdvancedPricingImportExport\Model\Export\AdvancedPricing::class
)
->setMethods($mockMethods)
Expand Down Expand Up @@ -347,6 +353,7 @@ protected function tearDown()
* @param $object
* @param $property
* @return mixed
* @throws \ReflectionException
*/
protected function getPropertyValue($object, $property)
{
Expand All @@ -362,6 +369,8 @@ protected function getPropertyValue($object, $property)
* @param $object
* @param $property
* @param $value
* @return mixed
* @throws \ReflectionException
*/
protected function setPropertyValue(&$object, $property, $value)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,9 @@ public function testIsValidAddMessagesCall($value, $hasEmptyColumns, $customerGr
$this->tierPrice->isValid($value);
}

/**
* @return array
*/
public function isValidResultFalseDataProvider()
{
return [
Expand Down Expand Up @@ -286,6 +289,9 @@ public function isValidResultFalseDataProvider()
];
}

/**
* @return array
*/
public function isValidAddMessagesCallDataProvider()
{
return [
Expand Down Expand Up @@ -340,6 +346,7 @@ public function isValidAddMessagesCallDataProvider()
* @param object $object
* @param string $property
* @return mixed
* @throws \ReflectionException
*/
protected function getPropertyValue($object, $property)
{
Expand All @@ -357,6 +364,7 @@ protected function getPropertyValue($object, $property)
* @param string $property
* @param mixed $value
* @return object
* @throws \ReflectionException
*/
protected function setPropertyValue(&$object, $property, $value)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ public function testGetAllWebsitesValue()
$this->assertEquals($expectedResult, $result);
}

/**
* @return array
*/
public function isValidReturnDataProvider()
{
return [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ public function testInit()
$this->validator->init(null);
}

/**
* @return array
*/
public function isValidDataProvider()
{
return [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,10 @@ public function testGetEntityTypeCode()
* Test method validateRow against its result.
*
* @dataProvider validateRowResultDataProvider
* @param array $rowData
* @param string|null $behavior
* @param bool $expectedResult
* @throws \ReflectionException
*/
public function testValidateRowResult($rowData, $behavior, $expectedResult)
{
Expand All @@ -234,6 +238,10 @@ public function testValidateRowResult($rowData, $behavior, $expectedResult)
* Test method validateRow whether AddRowError is called.
*
* @dataProvider validateRowAddRowErrorCallDataProvider
* @param array $rowData
* @param string|null $behavior
* @param string $error
* @throws \ReflectionException
*/
public function testValidateRowAddRowErrorCall($rowData, $behavior, $error)
{
Expand Down Expand Up @@ -324,6 +332,13 @@ public function testSaveAdvancedPricing()
* Take into consideration different data and check relative internal calls.
*
* @dataProvider saveAndReplaceAdvancedPricesAppendBehaviourDataProvider
* @param array $data
* @param string $tierCustomerGroupId
* @param string $groupCustomerGroupId
* @param string $tierWebsiteId
* @param string $groupWebsiteId
* @param array $expectedTierPrices
* @throws \ReflectionException
*/
public function testSaveAndReplaceAdvancedPricesAppendBehaviourDataAndCalls(
$data,
Expand Down Expand Up @@ -768,6 +783,9 @@ public function testSaveProductPrices($priceData, $oldSkus, $priceIn, $callNum)
$this->invokeMethod($this->advancedPricing, 'saveProductPrices', [$priceData, 'table']);
}

/**
* @return array
*/
public function saveProductPricesDataProvider()
{
return [
Expand Down Expand Up @@ -839,6 +857,9 @@ public function testDeleteProductTierPrices(
);
}

/**
* @return array
*/
public function deleteProductTierPricesDataProvider()
{
return [
Expand Down Expand Up @@ -921,6 +942,9 @@ public function testProcessCountExistingPrices(
$this->invokeMethod($this->advancedPricing, 'processCountExistingPrices', [$prices, 'table']);
}

/**
* @return array
*/
public function processCountExistingPricesDataProvider()
{
return [
Expand All @@ -947,6 +971,7 @@ public function processCountExistingPricesDataProvider()
* @param $object
* @param $property
* @return mixed
* @throws \ReflectionException
*/
protected function getPropertyValue($object, $property)
{
Expand All @@ -963,6 +988,8 @@ protected function getPropertyValue($object, $property)
* @param $object
* @param $property
* @param $value
* @return mixed
* @throws \ReflectionException
*/
protected function setPropertyValue(&$object, $property, $value)
{
Expand All @@ -980,8 +1007,8 @@ protected function setPropertyValue(&$object, $property, $value)
* @param object $object
* @param string $method
* @param array $args
*
* @return mixed the method result.
* @return mixed
* @throws \ReflectionException
*/
private function invokeMethod($object, $method, $args = [])
{
Expand All @@ -998,6 +1025,7 @@ private function invokeMethod($object, $method, $args = [])
* @param array $methods
*
* @return \PHPUnit_Framework_MockObject_MockObject
* @throws \ReflectionException
*/
private function getAdvancedPricingMock($methods = [])
{
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/AdvancedSearch/Block/SearchData.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ abstract class SearchData extends Template implements SearchDataInterface
/**
* @var string
*/
protected $_template = 'search_data.phtml';
protected $_template = 'Magento_AdvancedSearch::search_data.phtml';

/**
* @param Template\Context $context
Expand Down
3 changes: 3 additions & 0 deletions app/code/Magento/AdvancedSearch/Test/Mftf/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Advanced Search Functional Tests

The Functional Test Module for **Magento Advanced Search** module.
Loading

0 comments on commit 57c2e4c

Please sign in to comment.