+
+
+ Please replace this text with you Privacy Policy.
+ Please add any additional cookies your website uses below (e.g. Google Analytics).
+
+
+
+ This privacy policy sets out how this website (hereafter "the Store") uses and protects any information that
+ you give the Store while using this website. The Store is committed to ensuring that your privacy is protected.
+ Should we ask you to provide certain information by which you can be identified when using this website, then
+ you can be assured that it will only be used in accordance with this privacy statement. The Store may change
+ this policy from time to time by updating this page. You should check this page from time to time to ensure
+ that you are happy with any changes.
+
+ What we collect
+ We may collect the following information:
+
+ - name
+ - contact information including email address
+ - demographic information such as postcode, preferences and interests
+ - other information relevant to customer surveys and/or offers
+
+
+ For the exhaustive list of cookies we collect see the List of cookies we collect section.
+
+ What we do with the information we gather
+
+ We require this information to understand your needs and provide you with a better service,
+ and in particular for the following reasons:
+
+
+ - Internal record keeping.
+ - We may use the information to improve our products and services.
+ -
+ We may periodically send promotional emails about new products, special offers or other information which we
+ think you may find interesting using the email address which you have provided.
+
+ -
+ From time to time, we may also use your information to contact you for market research purposes.
+ We may contact you by email, phone, fax or mail. We may use the information to customise the website
+ according to your interests.
+
+
+ Security
+
+ We are committed to ensuring that your information is secure. In order to prevent unauthorised access or
+ disclosure, we have put in place suitable physical, electronic and managerial procedures to safeguard and
+ secure the information we collect online.
+
+ How we use cookies
+
+ A cookie is a small file which asks permission to be placed on your computer's hard drive.
+ Once you agree, the file is added and the cookie helps analyse web traffic or lets you know when you visit
+ a particular site. Cookies allow web applications to respond to you as an individual. The web application
+ can tailor its operations to your needs, likes and dislikes by gathering and remembering information about
+ your preferences.
+
+
+ We use traffic log cookies to identify which pages are being used. This helps us analyse data about web page
+ traffic and improve our website in order to tailor it to customer needs. We only use this information for
+ statistical analysis purposes and then the data is removed from the system.
+
+
+ Overall, cookies help us provide you with a better website, by enabling us to monitor which pages you find
+ useful and which you do not. A cookie in no way gives us access to your computer or any information about you,
+ other than the data you choose to share with us. You can choose to accept or decline cookies.
+ Most web browsers automatically accept cookies, but you can usually modify your browser setting
+ to decline cookies if you prefer. This may prevent you from taking full advantage of the website.
+
+ Links to other websites
+
+ Our website may contain links to other websites of interest. However, once you have used these links
+ to leave our site, you should note that we do not have any control over that other website.
+ Therefore, we cannot be responsible for the protection and privacy of any information which you provide whilst
+ visiting such sites and such sites are not governed by this privacy statement.
+ You should exercise caution and look at the privacy statement applicable to the website in question.
+
+ Controlling your personal information
+ You may choose to restrict the collection or use of your personal information in the following ways:
+
+ -
+ whenever you are asked to fill in a form on the website, look for the box that you can click to indicate
+ that you do not want the information to be used by anybody for direct marketing purposes
+
+ -
+ if you have previously agreed to us using your personal information for direct marketing purposes,
+ you may change your mind at any time by letting us know using our Contact Us information
+
+
+
+ We will not sell, distribute or lease your personal information to third parties unless we have your permission
+ or are required by law to do so. We may use your personal information to send you promotional information
+ about third parties which we think you may find interesting if you tell us that you wish this to happen.
+
+
+ You may request details of personal information which we hold about you under the Data Protection Act 1998.
+ A small fee will be payable. If you would like a copy of the information held on you please email us this
+ request using our Contact Us information.
+
+
+ If you believe that any information we are holding on you is incorrect or incomplete,
+ please write to or email us as soon as possible, at the above address.
+ We will promptly correct any information found to be incorrect.
+
+ List of cookies we collect
+ The table below lists the cookies we collect and what information they store.
+
+
+
+ Cookie Name |
+ Cookie Description |
+
+
+
+
+ FORM_KEY |
+ Stores randomly generated key used to prevent forged requests. |
+
+
+ PHPSESSID |
+ Your session ID on the server. |
+
+
+ GUEST-VIEW |
+ Allows guests to view and edit their orders. |
+
+
+ PERSISTENT_SHOPPING_CART |
+ A link to information about your cart and viewing history, if you have asked for this. |
+
+
+ STF |
+ Information on products you have emailed to friends. |
+
+
+ STORE |
+ The store view or language you have selected. |
+
+
+ USER_ALLOWED_SAVE_COOKIE |
+ Indicates whether a customer allowed to use cookies. |
+
+
+ MAGE-CACHE-SESSID |
+ Facilitates caching of content on the browser to make pages load faster. |
+
+
+ MAGE-CACHE-STORAGE |
+ Facilitates caching of content on the browser to make pages load faster. |
+
+
+ MAGE-CACHE-STORAGE-SECTION-INVALIDATION |
+ Facilitates caching of content on the browser to make pages load faster. |
+
+
+ MAGE-CACHE-TIMEOUT |
+ Facilitates caching of content on the browser to make pages load faster. |
+
+
+ SECTION-DATA-IDS |
+ Facilitates caching of content on the browser to make pages load faster. |
+
+
+ PRIVATE_CONTENT_VERSION |
+ Facilitates caching of content on the browser to make pages load faster. |
+
+
+ X-MAGENTO-VARY |
+ Facilitates caching of content on the server to make pages load faster. |
+
+
+ MAGE-TRANSLATION-FILE-VERSION |
+ Facilitates translation of content to other languages. |
+
+
+ MAGE-TRANSLATION-STORAGE |
+ Facilitates translation of content to other languages. |
+
+
+
+
+EOD;
+ $privacyAndCookiePolicyPage = $this->createPage()->load(self::PRIVACY_COOKIE_PAGE_ID);
+ $privacyAndCookiePolicyPage->setContent($newPageContent);
+ $privacyAndCookiePolicyPage->save();
+ }
+ $setup->endSetup();
+ }
+}
diff --git a/app/code/Magento/Cms/Test/Unit/Controller/Adminhtml/Page/InlineEditTest.php b/app/code/Magento/Cms/Test/Unit/Controller/Adminhtml/Page/InlineEditTest.php
index dfb1ecf61d0a..5ff68d688503 100644
--- a/app/code/Magento/Cms/Test/Unit/Controller/Adminhtml/Page/InlineEditTest.php
+++ b/app/code/Magento/Cms/Test/Unit/Controller/Adminhtml/Page/InlineEditTest.php
@@ -45,7 +45,7 @@ class InlineEditTest extends \PHPUnit_Framework_TestCase
/** @var InlineEdit */
protected $controller;
- public function setUp()
+ protected function setUp()
{
$helper = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
diff --git a/app/code/Magento/Cms/Test/Unit/Controller/Block/InlineEditTest.php b/app/code/Magento/Cms/Test/Unit/Controller/Block/InlineEditTest.php
index 2b4ae3088c7f..0d74681bae6c 100644
--- a/app/code/Magento/Cms/Test/Unit/Controller/Block/InlineEditTest.php
+++ b/app/code/Magento/Cms/Test/Unit/Controller/Block/InlineEditTest.php
@@ -30,7 +30,7 @@ class InlineEditTest extends \PHPUnit_Framework_TestCase
/** @var InlineEdit */
protected $controller;
- public function setUp()
+ protected function setUp()
{
$helper = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
diff --git a/app/code/Magento/Cms/Test/Unit/Controller/Page/PostDataProcessorTest.php b/app/code/Magento/Cms/Test/Unit/Controller/Page/PostDataProcessorTest.php
index 3a084d3d561a..16ba00c1c349 100644
--- a/app/code/Magento/Cms/Test/Unit/Controller/Page/PostDataProcessorTest.php
+++ b/app/code/Magento/Cms/Test/Unit/Controller/Page/PostDataProcessorTest.php
@@ -21,7 +21,7 @@ class PostDataProcessorTest extends \PHPUnit_Framework_TestCase
/** @var PostDataProcessor */
protected $postDataProcessor;
- public function setUp()
+ protected function setUp()
{
$this->dateFilter = $this->getMock('Magento\Framework\Stdlib\DateTime\Filter\Date', [], [], '', false);
$this->messageManager = $this->getMockForAbstractClass(
diff --git a/app/code/Magento/Cms/Test/Unit/Model/BlockRepositoryTest.php b/app/code/Magento/Cms/Test/Unit/Model/BlockRepositoryTest.php
index 5cf9f9615498..b2318d05c725 100644
--- a/app/code/Magento/Cms/Test/Unit/Model/BlockRepositoryTest.php
+++ b/app/code/Magento/Cms/Test/Unit/Model/BlockRepositoryTest.php
@@ -61,7 +61,7 @@ class BlockRepositoryTest extends \PHPUnit_Framework_TestCase
/**
* Initialize repository
*/
- public function setUp()
+ protected function setUp()
{
$this->blockResource = $this->getMockBuilder('Magento\Cms\Model\ResourceModel\Block')
->disableOriginalConstructor()
diff --git a/app/code/Magento/Cms/Test/Unit/Model/PageRepositoryTest.php b/app/code/Magento/Cms/Test/Unit/Model/PageRepositoryTest.php
index fb2a53346d41..903f75176e98 100644
--- a/app/code/Magento/Cms/Test/Unit/Model/PageRepositoryTest.php
+++ b/app/code/Magento/Cms/Test/Unit/Model/PageRepositoryTest.php
@@ -61,7 +61,7 @@ class PageRepositoryTest extends \PHPUnit_Framework_TestCase
/**
* Initialize repository
*/
- public function setUp()
+ protected function setUp()
{
$this->pageResource = $this->getMockBuilder('Magento\Cms\Model\ResourceModel\Page')
->disableOriginalConstructor()
diff --git a/app/code/Magento/Cms/etc/module.xml b/app/code/Magento/Cms/etc/module.xml
index ced71ecf6c9a..bb3aaf184fd6 100644
--- a/app/code/Magento/Cms/etc/module.xml
+++ b/app/code/Magento/Cms/etc/module.xml
@@ -6,7 +6,7 @@
*/
-->
-
+
diff --git a/app/code/Magento/Cms/view/adminhtml/ui_component/cms_page_listing.xml b/app/code/Magento/Cms/view/adminhtml/ui_component/cms_page_listing.xml
index 058179ac951d..8c567b2d23b9 100644
--- a/app/code/Magento/Cms/view/adminhtml/ui_component/cms_page_listing.xml
+++ b/app/code/Magento/Cms/view/adminhtml/ui_component/cms_page_listing.xml
@@ -257,6 +257,7 @@
- Magento_Ui/js/grid/columns/date
- date
- date
+ - false
- Custom design from
- MMM d, y
- false
@@ -270,6 +271,7 @@
- Magento_Ui/js/grid/columns/date
- date
- date
+ - false
- Custom design to
- MMM d, y
- false
diff --git a/app/code/Magento/CmsUrlRewrite/Test/Unit/Plugin/Cms/Model/ResourceModel/PageTest.php b/app/code/Magento/CmsUrlRewrite/Test/Unit/Plugin/Cms/Model/ResourceModel/PageTest.php
index f3570efa8f7b..279d3adf3c49 100644
--- a/app/code/Magento/CmsUrlRewrite/Test/Unit/Plugin/Cms/Model/ResourceModel/PageTest.php
+++ b/app/code/Magento/CmsUrlRewrite/Test/Unit/Plugin/Cms/Model/ResourceModel/PageTest.php
@@ -35,7 +35,7 @@ class PageTest extends \PHPUnit_Framework_TestCase
*/
protected $closureMock;
- public function setUp()
+ protected function setUp()
{
$objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
diff --git a/app/code/Magento/Config/Block/System/Config/Form.php b/app/code/Magento/Config/Block/System/Config/Form.php
index f544e3d86be4..0204219765dd 100644
--- a/app/code/Magento/Config/Block/System/Config/Form.php
+++ b/app/code/Magento/Config/Block/System/Config/Form.php
@@ -309,6 +309,17 @@ protected function _initElement(
if (array_key_exists($path, $this->_configData)) {
$data = $this->_configData[$path];
$inherit = false;
+
+ if ($field->hasBackendModel()) {
+ $backendModel = $field->getBackendModel();
+ $backendModel->setPath($path)
+ ->setValue($data)
+ ->setWebsite($this->getWebsiteCode())
+ ->setStore($this->getStoreCode())
+ ->afterLoad();
+ $data = $backendModel->getValue();
+ }
+
} elseif ($field->getConfigPath() !== null) {
$data = $this->getConfigValue($field->getConfigPath());
} else {
@@ -327,20 +338,6 @@ protected function _initElement(
$elementName = $this->_generateElementName($field->getPath(), $fieldPrefix);
$elementId = $this->_generateElementId($field->getPath($fieldPrefix));
- if ($field->hasBackendModel()) {
- $backendModel = $field->getBackendModel();
- $backendModel->setPath(
- $path
- )->setValue(
- $data
- )->setWebsite(
- $this->getWebsiteCode()
- )->setStore(
- $this->getStoreCode()
- )->afterLoad();
- $data = $backendModel->getValue();
- }
-
$dependencies = $field->getDependencies($fieldPrefix, $this->getStoreCode());
$this->_populateDependenciesBlock($dependencies, $elementId, $elementName);
@@ -607,6 +604,7 @@ protected function _getAdditionalElementTypes()
* Temporary moved those $this->getRequest()->getParam('blabla') from the code accross this block
* to getBlala() methods to be later set from controller with setters
*/
+
/**
* Enter description here...
*
diff --git a/app/code/Magento/Config/Test/Unit/Block/System/Config/FormTest.php b/app/code/Magento/Config/Test/Unit/Block/System/Config/FormTest.php
index b3632d9df433..b8b6b253eb39 100644
--- a/app/code/Magento/Config/Test/Unit/Block/System/Config/FormTest.php
+++ b/app/code/Magento/Config/Test/Unit/Block/System/Config/FormTest.php
@@ -390,12 +390,26 @@ public function initGroupDataProvider()
[false, [['field' => 'field', 'label' => 'label']], 1],
];
}
+
/**
+ * @param array $backendConfigValue
+ * @param string|bool $configValue
+ * @param string|null $configPath
+ * @param bool $inherit
+ * @param string $expectedValue
+ * @param int $hasBackendModel
+ *
* @dataProvider initFieldsDataProvider
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
*/
- public function testInitFields($backendConfigValue, $configValue, $configPath, $inherit, $expectedValue)
- {
+ public function testInitFields(
+ $backendConfigValue,
+ $configValue,
+ $configPath,
+ $inherit,
+ $expectedValue,
+ $hasBackendModel
+ ) {
// Parameters initialization
$fieldsetMock = $this->getMock(
'Magento\Framework\Data\Form\Element\Fieldset',
@@ -477,7 +491,13 @@ public function testInitFields($backendConfigValue, $configValue, $configPath, $
$fieldMock->expects($this->any())->method('getGroupPath')->will($this->returnValue('some/config/path'));
$fieldMock->expects($this->once())->method('getSectionId')->will($this->returnValue('some_section'));
- $fieldMock->expects($this->once())->method('hasBackendModel')->will($this->returnValue(false));
+ $fieldMock->expects(
+ $this->exactly($hasBackendModel)
+ )->method(
+ 'hasBackendModel'
+ )->will(
+ $this->returnValue(false)
+ );
$fieldMock->expects(
$this->once()
)->method(
@@ -556,8 +576,8 @@ public function testInitFields($backendConfigValue, $configValue, $configPath, $
public function initFieldsDataProvider()
{
return [
- [['section1/group1/field1' => 'some_value'], false, null, false, 'some_value'],
- [[], 'Config Value', 'some/config/path', true, 'Config Value']
+ [['section1/group1/field1' => 'some_value'], false, null, false, 'some_value', 1],
+ [[], 'Config Value', 'some/config/path', true, 'Config Value', 0]
];
}
}
diff --git a/app/code/Magento/Config/Test/Unit/Model/Config/Backend/Image/LogoTest.php b/app/code/Magento/Config/Test/Unit/Model/Config/Backend/Image/LogoTest.php
index 8ecd759b4021..61d09801adae 100644
--- a/app/code/Magento/Config/Test/Unit/Model/Config/Backend/Image/LogoTest.php
+++ b/app/code/Magento/Config/Test/Unit/Model/Config/Backend/Image/LogoTest.php
@@ -27,7 +27,7 @@ class LogoTest extends \PHPUnit_Framework_TestCase
*/
private $requestDataMock;
- public function setUp()
+ protected function setUp()
{
$helper = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
$this->uploaderFactoryMock = $this->getMockBuilder('\Magento\MediaStorage\Model\File\UploaderFactory')
diff --git a/app/code/Magento/ConfigurableProduct/Test/Unit/Model/LinkManagementTest.php b/app/code/Magento/ConfigurableProduct/Test/Unit/Model/LinkManagementTest.php
index b03466161f13..0401effc7a24 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Unit/Model/LinkManagementTest.php
+++ b/app/code/Magento/ConfigurableProduct/Test/Unit/Model/LinkManagementTest.php
@@ -40,7 +40,7 @@ class LinkManagementTest extends \PHPUnit_Framework_TestCase
*/
protected $dataObjectHelperMock;
- public function setUp()
+ protected function setUp()
{
$this->productRepository = $this->getMock('\Magento\Catalog\Api\ProductRepositoryInterface');
$this->objectManagerHelper = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
@@ -274,7 +274,6 @@ public function testRemoveChildInvalidChildSku()
->getMock();
$product->expects($this->once())->method('getTypeInstance')->willReturn($productType);
-
$this->productRepository->expects($this->any())->method('get')->will($this->returnValue($product));
$option = $this->getMockBuilder('\Magento\Catalog\Model\Product')
diff --git a/app/code/Magento/Contact/Test/Unit/Controller/Index/IndexTest.php b/app/code/Magento/Contact/Test/Unit/Controller/Index/IndexTest.php
index a41c95bec8d4..ed4d4787379b 100644
--- a/app/code/Magento/Contact/Test/Unit/Controller/Index/IndexTest.php
+++ b/app/code/Magento/Contact/Test/Unit/Controller/Index/IndexTest.php
@@ -36,7 +36,7 @@ class IndexTest extends \PHPUnit_Framework_TestCase
*/
protected $_url;
- public function setUp()
+ protected function setUp()
{
$this->_scopeConfig = $this->getMockForAbstractClass(
'\Magento\Framework\App\Config\ScopeConfigInterface',
diff --git a/app/code/Magento/Contact/Test/Unit/Controller/Index/PostTest.php b/app/code/Magento/Contact/Test/Unit/Controller/Index/PostTest.php
index 386645f7ce1a..30543e33b835 100644
--- a/app/code/Magento/Contact/Test/Unit/Controller/Index/PostTest.php
+++ b/app/code/Magento/Contact/Test/Unit/Controller/Index/PostTest.php
@@ -61,7 +61,7 @@ class PostTest extends \PHPUnit_Framework_TestCase
*/
protected $_storeManager;
- public function setUp()
+ protected function setUp()
{
$this->_scopeConfig = $this->getMockForAbstractClass(
'\Magento\Framework\App\Config\ScopeConfigInterface',
diff --git a/app/code/Magento/Contact/Test/Unit/Controller/IndexTest.php b/app/code/Magento/Contact/Test/Unit/Controller/IndexTest.php
index 922d8ce0ec8f..2472f9aee965 100644
--- a/app/code/Magento/Contact/Test/Unit/Controller/IndexTest.php
+++ b/app/code/Magento/Contact/Test/Unit/Controller/IndexTest.php
@@ -22,7 +22,7 @@ class IndexTest extends \PHPUnit_Framework_TestCase
*/
protected $_scopeConfig;
- public function setUp()
+ protected function setUp()
{
$this->_scopeConfig = $this->getMockForAbstractClass(
'\Magento\Framework\App\Config\ScopeConfigInterface',
diff --git a/app/code/Magento/Contact/Test/Unit/Helper/DataTest.php b/app/code/Magento/Contact/Test/Unit/Helper/DataTest.php
index 2c885dfd11c1..9aa1a58be97a 100644
--- a/app/code/Magento/Contact/Test/Unit/Helper/DataTest.php
+++ b/app/code/Magento/Contact/Test/Unit/Helper/DataTest.php
@@ -36,7 +36,7 @@ class DataTest extends \PHPUnit_Framework_TestCase
*/
protected $_customerViewHelper;
- public function setUp()
+ protected function setUp()
{
$objectManagerHelper = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
$className = '\Magento\Contact\Helper\Data';
diff --git a/app/code/Magento/Contact/Test/Unit/Model/System/Config/Backend/LinksTest.php b/app/code/Magento/Contact/Test/Unit/Model/System/Config/Backend/LinksTest.php
index 81f3c9af7110..1ef0f5fd8f7f 100644
--- a/app/code/Magento/Contact/Test/Unit/Model/System/Config/Backend/LinksTest.php
+++ b/app/code/Magento/Contact/Test/Unit/Model/System/Config/Backend/LinksTest.php
@@ -14,7 +14,7 @@ class LinksTest extends \PHPUnit_Framework_TestCase
*/
protected $_model;
- public function setUp()
+ protected function setUp()
{
$this->_model = (new ObjectManager($this))->getObject('Magento\Contact\Model\System\Config\Backend\Links');
}
diff --git a/app/code/Magento/Cookie/Test/Unit/Model/Config/Backend/LifetimeTest.php b/app/code/Magento/Cookie/Test/Unit/Model/Config/Backend/LifetimeTest.php
index 6a11bf2a0a4b..b61ef86705b4 100644
--- a/app/code/Magento/Cookie/Test/Unit/Model/Config/Backend/LifetimeTest.php
+++ b/app/code/Magento/Cookie/Test/Unit/Model/Config/Backend/LifetimeTest.php
@@ -24,7 +24,7 @@ class LifetimeTest extends \PHPUnit_Framework_TestCase
/** @var \Magento\Cookie\Model\Config\Backend\Lifetime */
private $model;
- public function setUp()
+ protected function setUp()
{
$this->validatorMock = $this->getMockBuilder(
'Magento\Framework\Session\Config\Validator\CookieLifetimeValidator'
diff --git a/app/code/Magento/Cookie/Test/Unit/Model/Config/Backend/PathTest.php b/app/code/Magento/Cookie/Test/Unit/Model/Config/Backend/PathTest.php
index d30ab4d4f52e..56586181efe2 100644
--- a/app/code/Magento/Cookie/Test/Unit/Model/Config/Backend/PathTest.php
+++ b/app/code/Magento/Cookie/Test/Unit/Model/Config/Backend/PathTest.php
@@ -24,7 +24,7 @@ class PathTest extends \PHPUnit_Framework_TestCase
/** @var \Magento\Cookie\Model\Config\Backend\Path */
private $model;
- public function setUp()
+ protected function setUp()
{
$this->validatorMock = $this->getMockBuilder('Magento\Framework\Session\Config\Validator\CookiePathValidator')
->disableOriginalConstructor()
diff --git a/app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php b/app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php
index 7a206daa34a6..27460006737c 100644
--- a/app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php
+++ b/app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php
@@ -100,6 +100,11 @@ class ProcessCronQueueObserver implements ObserverInterface
*/
protected $timezone;
+ /**
+ * @var \Symfony\Component\Process\PhpExecutableFinder
+ */
+ protected $phpExecutableFinder;
+
/**
* @param \Magento\Framework\ObjectManagerInterface $objectManager
* @param ScheduleFactory $scheduleFactory
@@ -109,6 +114,7 @@ class ProcessCronQueueObserver implements ObserverInterface
* @param \Magento\Framework\App\Console\Request $request
* @param \Magento\Framework\ShellInterface $shell
* @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $timezone
+ * @param \Magento\Framework\Process\PhpExecutableFinderFactory $phpExecutableFinderFactory
*/
public function __construct(
\Magento\Framework\ObjectManagerInterface $objectManager,
@@ -118,7 +124,8 @@ public function __construct(
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
\Magento\Framework\App\Console\Request $request,
\Magento\Framework\ShellInterface $shell,
- \Magento\Framework\Stdlib\DateTime\TimezoneInterface $timezone
+ \Magento\Framework\Stdlib\DateTime\TimezoneInterface $timezone,
+ \Magento\Framework\Process\PhpExecutableFinderFactory $phpExecutableFinderFactory
) {
$this->_objectManager = $objectManager;
$this->_scheduleFactory = $scheduleFactory;
@@ -128,6 +135,7 @@ public function __construct(
$this->_request = $request;
$this->_shell = $shell;
$this->timezone = $timezone;
+ $this->phpExecutableFinder = $phpExecutableFinderFactory->create();
}
/**
@@ -147,6 +155,8 @@ public function execute(\Magento\Framework\Event\Observer $observer)
$currentTime = $this->timezone->scopeTimeStamp();
$jobGroupsRoot = $this->_config->getJobs();
+ $phpPath = $this->phpExecutableFinder->find() ?: 'php';
+
foreach ($jobGroupsRoot as $groupId => $jobsRoot) {
if ($this->_request->getParam('group') !== null
&& $this->_request->getParam('group') !== '\'' . ($groupId) . '\''
@@ -160,7 +170,7 @@ public function execute(\Magento\Framework\Event\Observer $observer)
) == 1
)) {
$this->_shell->execute(
- 'php %s cron:run --group=' . $groupId . ' --' . CLI::INPUT_KEY_BOOTSTRAP . '='
+ $phpPath . ' %s cron:run --group=' . $groupId . ' --' . CLI::INPUT_KEY_BOOTSTRAP . '='
. self::STANDALONE_PROCESS_STARTED . '=1',
[
BP . '/bin/magento'
diff --git a/app/code/Magento/Cron/Test/Unit/Model/Config/Reader/XmlTest.php b/app/code/Magento/Cron/Test/Unit/Model/Config/Reader/XmlTest.php
index 0f3304c67f3b..30c56734d1ad 100644
--- a/app/code/Magento/Cron/Test/Unit/Model/Config/Reader/XmlTest.php
+++ b/app/code/Magento/Cron/Test/Unit/Model/Config/Reader/XmlTest.php
@@ -15,7 +15,7 @@ class XmlTest extends \PHPUnit_Framework_TestCase
/**
* Prepare parameters
*/
- public function setUp()
+ protected function setUp()
{
$fileResolver = $this->getMockBuilder(
'Magento\Framework\App\Config\FileResolver'
diff --git a/app/code/Magento/Cron/Test/Unit/Model/Config/XsdTest.php b/app/code/Magento/Cron/Test/Unit/Model/Config/XsdTest.php
index 736323fa7e36..cc0881d4546d 100644
--- a/app/code/Magento/Cron/Test/Unit/Model/Config/XsdTest.php
+++ b/app/code/Magento/Cron/Test/Unit/Model/Config/XsdTest.php
@@ -12,7 +12,7 @@ class XsdTest extends \PHPUnit_Framework_TestCase
*/
protected $_xsdFile;
- public function setUp()
+ protected function setUp()
{
if (!function_exists('libxml_set_external_entity_loader')) {
$this->markTestSkipped('Skipped on HHVM. Will be fixed in MAGETWO-45033');
diff --git a/app/code/Magento/Cron/Test/Unit/Model/Groups/Config/Converter/XmlTest.php b/app/code/Magento/Cron/Test/Unit/Model/Groups/Config/Converter/XmlTest.php
index a50f32a42b1f..9083fb31e77a 100644
--- a/app/code/Magento/Cron/Test/Unit/Model/Groups/Config/Converter/XmlTest.php
+++ b/app/code/Magento/Cron/Test/Unit/Model/Groups/Config/Converter/XmlTest.php
@@ -12,7 +12,7 @@ class XmlTest extends \PHPUnit_Framework_TestCase
*/
protected $object;
- public function setUp()
+ protected function setUp()
{
$this->object = new \Magento\Cron\Model\Groups\Config\Converter\Xml();
}
diff --git a/app/code/Magento/Cron/Test/Unit/Model/ScheduleTest.php b/app/code/Magento/Cron/Test/Unit/Model/ScheduleTest.php
index f983970ee7a2..d0cfadb1a6be 100644
--- a/app/code/Magento/Cron/Test/Unit/Model/ScheduleTest.php
+++ b/app/code/Magento/Cron/Test/Unit/Model/ScheduleTest.php
@@ -17,7 +17,7 @@ class ScheduleTest extends \PHPUnit_Framework_TestCase
protected $resourceJobMock;
- public function setUp()
+ protected function setUp()
{
$this->helper = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
diff --git a/app/code/Magento/Cron/Test/Unit/Observer/ProcessCronQueueObserverTest.php b/app/code/Magento/Cron/Test/Unit/Observer/ProcessCronQueueObserverTest.php
index cb59fbd19a2e..3d101b88d064 100644
--- a/app/code/Magento/Cron/Test/Unit/Observer/ProcessCronQueueObserverTest.php
+++ b/app/code/Magento/Cron/Test/Unit/Observer/ProcessCronQueueObserverTest.php
@@ -75,7 +75,7 @@ class ProcessCronQueueObserverTest extends \PHPUnit_Framework_TestCase
/**
* Prepare parameters
*/
- public function setUp()
+ protected function setUp()
{
$this->_objectManager = $this->getMockBuilder(
'Magento\Framework\App\ObjectManager'
@@ -110,6 +110,18 @@ public function setUp()
$this->timezone = $this->getMock('Magento\Framework\Stdlib\DateTime\TimezoneInterface');
$this->timezone->expects($this->any())->method('scopeTimeStamp')->will($this->returnValue(time()));
+
+ $phpExecutableFinder = $this->getMock('Symfony\Component\Process\PhpExecutableFinder', [], [], '', false);
+ $phpExecutableFinder->expects($this->any())->method('find')->willReturn('php');
+ $phpExecutableFinderFactory = $this->getMock(
+ 'Magento\Framework\Process\PhpExecutableFinderFactory',
+ [],
+ [],
+ '',
+ false
+ );
+ $phpExecutableFinderFactory->expects($this->any())->method('create')->willReturn($phpExecutableFinder);
+
$this->_observer = new ProcessCronQueueObserver(
$this->_objectManager,
$this->_scheduleFactory,
@@ -118,7 +130,8 @@ public function setUp()
$this->_scopeConfig,
$this->_request,
$this->_shell,
- $this->timezone
+ $this->timezone,
+ $phpExecutableFinderFactory
);
}
diff --git a/app/code/Magento/CurrencySymbol/Test/Unit/Controller/Adminhtml/System/Currencysymbol/IndexTest.php b/app/code/Magento/CurrencySymbol/Test/Unit/Controller/Adminhtml/System/Currencysymbol/IndexTest.php
index 26c2a4a83b04..365db9897454 100644
--- a/app/code/Magento/CurrencySymbol/Test/Unit/Controller/Adminhtml/System/Currencysymbol/IndexTest.php
+++ b/app/code/Magento/CurrencySymbol/Test/Unit/Controller/Adminhtml/System/Currencysymbol/IndexTest.php
@@ -57,7 +57,7 @@ class IndexTest extends \PHPUnit_Framework_TestCase
*/
protected $titleMock;
- public function setUp()
+ protected function setUp()
{
$objectManager = new ObjectManager($this);
diff --git a/app/code/Magento/CurrencySymbol/Test/Unit/Controller/Adminhtml/System/Currencysymbol/SaveTest.php b/app/code/Magento/CurrencySymbol/Test/Unit/Controller/Adminhtml/System/Currencysymbol/SaveTest.php
index 618846230924..6372c737f832 100644
--- a/app/code/Magento/CurrencySymbol/Test/Unit/Controller/Adminhtml/System/Currencysymbol/SaveTest.php
+++ b/app/code/Magento/CurrencySymbol/Test/Unit/Controller/Adminhtml/System/Currencysymbol/SaveTest.php
@@ -57,7 +57,7 @@ class SaveTest extends \PHPUnit_Framework_TestCase
*/
protected $filterManagerMock;
- public function setUp()
+ protected function setUp()
{
$objectManager = new ObjectManager($this);
diff --git a/app/code/Magento/CurrencySymbol/Test/Unit/Observer/CurrencyDisplayOptionsTest.php b/app/code/Magento/CurrencySymbol/Test/Unit/Observer/CurrencyDisplayOptionsTest.php
index faf5f7d930cf..d9a9c1833cfe 100644
--- a/app/code/Magento/CurrencySymbol/Test/Unit/Observer/CurrencyDisplayOptionsTest.php
+++ b/app/code/Magento/CurrencySymbol/Test/Unit/Observer/CurrencyDisplayOptionsTest.php
@@ -37,7 +37,7 @@ class CurrencyDisplayOptionsTest extends \PHPUnit_Framework_TestCase
*/
private $mockEvent;
- public function setUp()
+ protected function setUp()
{
$this->mockSymbolFactory = $this->getMock(
'Magento\CurrencySymbol\Model\System\CurrencysymbolFactory',
diff --git a/app/code/Magento/Customer/Model/Plugin/CustomerRepository/TransactionWrapper.php b/app/code/Magento/Customer/Model/Plugin/CustomerRepository/TransactionWrapper.php
new file mode 100644
index 000000000000..4820ff56d13e
--- /dev/null
+++ b/app/code/Magento/Customer/Model/Plugin/CustomerRepository/TransactionWrapper.php
@@ -0,0 +1,52 @@
+resourceModel = $resourceModel;
+ }
+
+ /**
+ * @param \Magento\Customer\Api\CustomerRepositoryInterface $subject
+ * @param callable $proceed
+ * @param \Magento\Customer\Api\Data\CustomerInterface $customer
+ * @param string $passwordHash
+ * @return \Magento\Customer\Api\Data\CustomerInterface
+ * @throws \Exception
+ * @SuppressWarnings(PHPMD.UnusedFormalParameter)
+ */
+ public function aroundSave(
+ \Magento\Customer\Api\CustomerRepositoryInterface $subject,
+ \Closure $proceed,
+ \Magento\Customer\Api\Data\CustomerInterface $customer,
+ $passwordHash = null
+ ) {
+ $this->resourceModel->beginTransaction();
+ try {
+ /** @var $result \Magento\Customer\Api\Data\CustomerInterface */
+ $result = $proceed($customer, $passwordHash);
+ $this->resourceModel->commit();
+ return $result;
+ } catch (\Exception $e) {
+ $this->resourceModel->rollBack();
+ throw $e;
+ }
+ }
+}
diff --git a/app/code/Magento/Customer/Test/Unit/Block/Account/Dashboard/InfoTest.php b/app/code/Magento/Customer/Test/Unit/Block/Account/Dashboard/InfoTest.php
index 7e59b04c4e37..3b10c04f8035 100644
--- a/app/code/Magento/Customer/Test/Unit/Block/Account/Dashboard/InfoTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Block/Account/Dashboard/InfoTest.php
@@ -54,7 +54,7 @@ class InfoTest extends \PHPUnit_Framework_TestCase
*/
protected $currentCustomer;
- public function setUp()
+ protected function setUp()
{
$this->currentCustomer = $this->getMock(
'Magento\Customer\Helper\Session\CurrentCustomer',
diff --git a/app/code/Magento/Customer/Test/Unit/Block/Adminhtml/Edit/Tab/NewsletterTest.php b/app/code/Magento/Customer/Test/Unit/Block/Adminhtml/Edit/Tab/NewsletterTest.php
index 8d4064027a4b..6ffc6631f804 100644
--- a/app/code/Magento/Customer/Test/Unit/Block/Adminhtml/Edit/Tab/NewsletterTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Block/Adminhtml/Edit/Tab/NewsletterTest.php
@@ -44,7 +44,7 @@ class NewsletterTest extends \PHPUnit_Framework_TestCase
*/
protected $urlBuilderMock;
- public function setUp()
+ protected function setUp()
{
$this->contextMock = $this->getMock('\Magento\Backend\Block\Template\Context', [], [], '', false);
$this->registryMock = $this->getMock('\Magento\Framework\Registry', [], [], '', false);
diff --git a/app/code/Magento/Customer/Test/Unit/Block/Form/Login/InfoTest.php b/app/code/Magento/Customer/Test/Unit/Block/Form/Login/InfoTest.php
index 9864407f93dc..def45459ac1d 100644
--- a/app/code/Magento/Customer/Test/Unit/Block/Form/Login/InfoTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Block/Form/Login/InfoTest.php
@@ -27,7 +27,7 @@ class InfoTest extends \PHPUnit_Framework_TestCase
*/
protected $coreUrl;
- public function setUp()
+ protected function setUp()
{
$this->customerUrl = $this->getMockBuilder(
'Magento\Customer\Model\Url'
diff --git a/app/code/Magento/Customer/Test/Unit/Block/Form/RegisterTest.php b/app/code/Magento/Customer/Test/Unit/Block/Form/RegisterTest.php
index e461f358548a..2fa52d655286 100644
--- a/app/code/Magento/Customer/Test/Unit/Block/Form/RegisterTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Block/Form/RegisterTest.php
@@ -46,7 +46,7 @@ class RegisterTest extends \PHPUnit_Framework_TestCase
/** @var Register */
private $_block;
- public function setUp()
+ protected function setUp()
{
$this->_scopeConfig = $this->getMock('Magento\Framework\App\Config\ScopeConfigInterface');
$this->_moduleManager = $this->getMock('Magento\Framework\Module\Manager', [], [], '', false);
diff --git a/app/code/Magento/Customer/Test/Unit/Block/Widget/AbstractWidgetTest.php b/app/code/Magento/Customer/Test/Unit/Block/Widget/AbstractWidgetTest.php
index a65eae138635..9bfb3799eaac 100644
--- a/app/code/Magento/Customer/Test/Unit/Block/Widget/AbstractWidgetTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Block/Widget/AbstractWidgetTest.php
@@ -24,7 +24,7 @@ class AbstractWidgetTest extends \PHPUnit_Framework_TestCase
/** @var AbstractWidget */
private $_block;
- public function setUp()
+ protected function setUp()
{
$this->_addressHelper = $this->getMock('Magento\Customer\Helper\Address', [], [], '', false);
diff --git a/app/code/Magento/Customer/Test/Unit/Block/Widget/DobTest.php b/app/code/Magento/Customer/Test/Unit/Block/Widget/DobTest.php
index 8381c2de8d7d..ec39a2dcea52 100644
--- a/app/code/Magento/Customer/Test/Unit/Block/Widget/DobTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Block/Widget/DobTest.php
@@ -56,7 +56,7 @@ class DobTest extends \PHPUnit_Framework_TestCase
*/
protected $filterFactory;
- public function setUp()
+ protected function setUp()
{
$zendCacheCore = new \Zend_Cache_Core();
$zendCacheCore->setBackend(new \Zend_Cache_Backend_BlackHole());
diff --git a/app/code/Magento/Customer/Test/Unit/Block/Widget/GenderTest.php b/app/code/Magento/Customer/Test/Unit/Block/Widget/GenderTest.php
index 79a92f57da5f..3a42e62a1d36 100644
--- a/app/code/Magento/Customer/Test/Unit/Block/Widget/GenderTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Block/Widget/GenderTest.php
@@ -36,7 +36,7 @@ class GenderTest extends \PHPUnit_Framework_TestCase
/** @var Gender */
private $block;
- public function setUp()
+ protected function setUp()
{
$this->attribute = $this->getMockBuilder('\Magento\Customer\Api\Data\AttributeMetadataInterface')
->getMockForAbstractClass();
diff --git a/app/code/Magento/Customer/Test/Unit/Block/Widget/NameTest.php b/app/code/Magento/Customer/Test/Unit/Block/Widget/NameTest.php
index 18bc070cc9b9..5e11d60040d1 100644
--- a/app/code/Magento/Customer/Test/Unit/Block/Widget/NameTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Block/Widget/NameTest.php
@@ -69,7 +69,7 @@ class NameTest extends \PHPUnit_Framework_TestCase
*/
protected $_objectManager;
- public function setUp()
+ protected function setUp()
{
$this->_objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
$this->_escaper = $this->getMock('Magento\Framework\Escaper', [], [], '', false);
diff --git a/app/code/Magento/Customer/Test/Unit/Block/Widget/TaxvatTest.php b/app/code/Magento/Customer/Test/Unit/Block/Widget/TaxvatTest.php
index a2f7638caf19..dc685adf2d5d 100644
--- a/app/code/Magento/Customer/Test/Unit/Block/Widget/TaxvatTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Block/Widget/TaxvatTest.php
@@ -29,7 +29,7 @@ class TaxvatTest extends \PHPUnit_Framework_TestCase
/** @var Taxvat */
private $_block;
- public function setUp()
+ protected function setUp()
{
$this->attribute = $this->getMockBuilder('\Magento\Customer\Api\Data\AttributeMetadataInterface')
->getMockForAbstractClass();
diff --git a/app/code/Magento/Customer/Test/Unit/Console/Command/UpgradeHashAlgorithmCommandTest.php b/app/code/Magento/Customer/Test/Unit/Console/Command/UpgradeHashAlgorithmCommandTest.php
index 65515e190d50..01fb316feb27 100644
--- a/app/code/Magento/Customer/Test/Unit/Console/Command/UpgradeHashAlgorithmCommandTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Console/Command/UpgradeHashAlgorithmCommandTest.php
@@ -26,7 +26,7 @@ class UpgradeHashAlgorithmCommandTest extends \PHPUnit_Framework_TestCase
*/
private $customerCollectionFactory;
- public function setUp()
+ protected function setUp()
{
$this->customerCollectionFactory = $this->getMockBuilder(
'Magento\Customer\Model\ResourceModel\Customer\CollectionFactory'
diff --git a/app/code/Magento/Customer/Test/Unit/Controller/Adminhtml/Index/InlineEditTest.php b/app/code/Magento/Customer/Test/Unit/Controller/Adminhtml/Index/InlineEditTest.php
index 880de81d88ee..d9596b1c8b70 100644
--- a/app/code/Magento/Customer/Test/Unit/Controller/Adminhtml/Index/InlineEditTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Controller/Adminhtml/Index/InlineEditTest.php
@@ -67,7 +67,7 @@ class InlineEditTest extends \PHPUnit_Framework_TestCase
/** @var array */
protected $items;
- public function setUp()
+ protected function setUp()
{
$objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
diff --git a/app/code/Magento/Customer/Test/Unit/Controller/Adminhtml/Index/MassAssignGroupTest.php b/app/code/Magento/Customer/Test/Unit/Controller/Adminhtml/Index/MassAssignGroupTest.php
index b72fa5e1fc5e..5bc85fe677b6 100644
--- a/app/code/Magento/Customer/Test/Unit/Controller/Adminhtml/Index/MassAssignGroupTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Controller/Adminhtml/Index/MassAssignGroupTest.php
@@ -70,7 +70,7 @@ class MassAssignGroupTest extends \PHPUnit_Framework_TestCase
*/
protected $customerRepositoryMock;
- public function setUp()
+ protected function setUp()
{
$objectManagerHelper = new ObjectManagerHelper($this);
diff --git a/app/code/Magento/Customer/Test/Unit/Controller/Adminhtml/Index/MassDeleteTest.php b/app/code/Magento/Customer/Test/Unit/Controller/Adminhtml/Index/MassDeleteTest.php
index cc5bdf5abe68..e4967daf85a5 100644
--- a/app/code/Magento/Customer/Test/Unit/Controller/Adminhtml/Index/MassDeleteTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Controller/Adminhtml/Index/MassDeleteTest.php
@@ -70,7 +70,7 @@ class MassDeleteTest extends \PHPUnit_Framework_TestCase
*/
protected $customerRepositoryMock;
- public function setUp()
+ protected function setUp()
{
$objectManagerHelper = new ObjectManagerHelper($this);
diff --git a/app/code/Magento/Customer/Test/Unit/Controller/Adminhtml/Index/MassSubscribeTest.php b/app/code/Magento/Customer/Test/Unit/Controller/Adminhtml/Index/MassSubscribeTest.php
index 12768e54b95d..6c8207a750c2 100644
--- a/app/code/Magento/Customer/Test/Unit/Controller/Adminhtml/Index/MassSubscribeTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Controller/Adminhtml/Index/MassSubscribeTest.php
@@ -75,7 +75,7 @@ class MassSubscribeTest extends \PHPUnit_Framework_TestCase
*/
protected $subscriberMock;
- public function setUp()
+ protected function setUp()
{
$objectManagerHelper = new ObjectManagerHelper($this);
diff --git a/app/code/Magento/Customer/Test/Unit/Controller/Adminhtml/Index/MassUnsubscribeTest.php b/app/code/Magento/Customer/Test/Unit/Controller/Adminhtml/Index/MassUnsubscribeTest.php
index 11c21db592a7..e12e703878eb 100644
--- a/app/code/Magento/Customer/Test/Unit/Controller/Adminhtml/Index/MassUnsubscribeTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Controller/Adminhtml/Index/MassUnsubscribeTest.php
@@ -75,7 +75,7 @@ class MassUnsubscribeTest extends \PHPUnit_Framework_TestCase
*/
protected $subscriberMock;
- public function setUp()
+ protected function setUp()
{
$objectManagerHelper = new ObjectManagerHelper($this);
diff --git a/app/code/Magento/Customer/Test/Unit/Controller/Adminhtml/Index/ValidateTest.php b/app/code/Magento/Customer/Test/Unit/Controller/Adminhtml/Index/ValidateTest.php
index cc8ed6c77180..979d41c13bfc 100644
--- a/app/code/Magento/Customer/Test/Unit/Controller/Adminhtml/Index/ValidateTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Controller/Adminhtml/Index/ValidateTest.php
@@ -62,7 +62,7 @@ class ValidateTest extends \PHPUnit_Framework_TestCase
/** @var \Magento\Customer\Controller\Adminhtml\Index\Validate */
protected $controller;
- public function setUp()
+ protected function setUp()
{
if (!function_exists('libxml_set_external_entity_loader')) {
$this->markTestSkipped('Skipped on HHVM. Will be fixed in MAGETWO-45033');
diff --git a/app/code/Magento/Customer/Test/Unit/Controller/Adminhtml/Index/ViewfileTest.php b/app/code/Magento/Customer/Test/Unit/Controller/Adminhtml/Index/ViewfileTest.php
index cc98e33edb8a..3586651d269d 100644
--- a/app/code/Magento/Customer/Test/Unit/Controller/Adminhtml/Index/ViewfileTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Controller/Adminhtml/Index/ViewfileTest.php
@@ -66,7 +66,7 @@ class ViewfileTest extends \PHPUnit_Framework_TestCase
*/
protected $requestMock;
- public function setUp()
+ protected function setUp()
{
$this->objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
$this->requestMock = $this->getMock('Magento\Framework\App\RequestInterface', [], [], '', false);
@@ -185,7 +185,6 @@ public function testExecuteGetParamImage()
]
);
-
$this->urlDecoderMock->expects($this->once())->method('decode')->with($decodedFile)->willReturn($file);
$this->resultRawMock->expects($this->once())->method('setHttpResponseCode')->with(200)->willReturnSelf();
diff --git a/app/code/Magento/Customer/Test/Unit/Helper/Session/CurrentCustomerAddressTest.php b/app/code/Magento/Customer/Test/Unit/Helper/Session/CurrentCustomerAddressTest.php
index 81977038ddf1..372aeca7a840 100644
--- a/app/code/Magento/Customer/Test/Unit/Helper/Session/CurrentCustomerAddressTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Helper/Session/CurrentCustomerAddressTest.php
@@ -35,7 +35,7 @@ class CurrentCustomerAddressTest extends \PHPUnit_Framework_TestCase
/**
* Test setup
*/
- public function setUp()
+ protected function setUp()
{
$this->currentCustomerMock = $this->getMockBuilder('Magento\Customer\Helper\Session\CurrentCustomer')
->disableOriginalConstructor()
diff --git a/app/code/Magento/Customer/Test/Unit/Helper/Session/CurrentCustomerTest.php b/app/code/Magento/Customer/Test/Unit/Helper/Session/CurrentCustomerTest.php
index 10c9e077aa66..3f390e2e3466 100644
--- a/app/code/Magento/Customer/Test/Unit/Helper/Session/CurrentCustomerTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Helper/Session/CurrentCustomerTest.php
@@ -68,7 +68,7 @@ class CurrentCustomerTest extends \PHPUnit_Framework_TestCase
/**
* Test setup
*/
- public function setUp()
+ protected function setUp()
{
$this->customerSessionMock = $this->getMock('Magento\Customer\Model\Session', [], [], '', false);
$this->layoutMock = $this->getMock('Magento\Framework\View\Layout', [], [], '', false);
diff --git a/app/code/Magento/Customer/Test/Unit/Helper/ViewTest.php b/app/code/Magento/Customer/Test/Unit/Helper/ViewTest.php
index 62715bed080d..b23e5bf4d7a2 100644
--- a/app/code/Magento/Customer/Test/Unit/Helper/ViewTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Helper/ViewTest.php
@@ -18,7 +18,7 @@ class ViewTest extends \PHPUnit_Framework_TestCase
/** @var CustomerMetadataInterface|\PHPUnit_Framework_MockObject_MockObject */
protected $customerMetadataService;
- public function setUp()
+ protected function setUp()
{
$this->context = $this->getMockBuilder('Magento\Framework\App\Helper\Context')
->disableOriginalConstructor()
diff --git a/app/code/Magento/Customer/Test/Unit/Model/Account/RedirectTest.php b/app/code/Magento/Customer/Test/Unit/Model/Account/RedirectTest.php
index 0561bd7bf0a8..2410bb894ce2 100644
--- a/app/code/Magento/Customer/Test/Unit/Model/Account/RedirectTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Model/Account/RedirectTest.php
@@ -78,7 +78,7 @@ class RedirectTest extends \PHPUnit_Framework_TestCase
*/
protected $resultFactory;
- public function setUp()
+ protected function setUp()
{
$this->request = $this->getMockForAbstractClass('Magento\Framework\App\RequestInterface');
diff --git a/app/code/Magento/Customer/Test/Unit/Model/Address/Config/ConverterTest.php b/app/code/Magento/Customer/Test/Unit/Model/Address/Config/ConverterTest.php
index 50f3efc85d3b..866a3cc622a7 100644
--- a/app/code/Magento/Customer/Test/Unit/Model/Address/Config/ConverterTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Model/Address/Config/ConverterTest.php
@@ -12,7 +12,7 @@ class ConverterTest extends \PHPUnit_Framework_TestCase
*/
protected $_model;
- public function setUp()
+ protected function setUp()
{
$this->_model = new \Magento\Customer\Model\Address\Config\Converter();
}
diff --git a/app/code/Magento/Customer/Test/Unit/Model/Address/ConfigTest.php b/app/code/Magento/Customer/Test/Unit/Model/Address/ConfigTest.php
index a52750579778..9dbec230b432 100644
--- a/app/code/Magento/Customer/Test/Unit/Model/Address/ConfigTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Model/Address/ConfigTest.php
@@ -47,7 +47,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
*/
protected $_cacheId = 'cache_id';
- public function setUp()
+ protected function setUp()
{
$this->_storeMock = $this->getMock('Magento\Store\Model\Store', [], [], '', false);
$this->_scopeConfigMock = $this->getMock('\Magento\Framework\App\Config\ScopeConfigInterface');
diff --git a/app/code/Magento/Customer/Test/Unit/Model/AddressRegistryTest.php b/app/code/Magento/Customer/Test/Unit/Model/AddressRegistryTest.php
index f12e7c5b3281..9662a48de385 100644
--- a/app/code/Magento/Customer/Test/Unit/Model/AddressRegistryTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Model/AddressRegistryTest.php
@@ -19,7 +19,7 @@ class AddressRegistryTest extends \PHPUnit_Framework_TestCase
*/
private $addressFactory;
- public function setUp()
+ protected function setUp()
{
$this->addressFactory = $this->getMockBuilder('\Magento\Customer\Model\AddressFactory')
->disableOriginalConstructor()
diff --git a/app/code/Magento/Customer/Test/Unit/Model/AddressTest.php b/app/code/Magento/Customer/Test/Unit/Model/AddressTest.php
index 77a7cf386d1f..ecdbecce9946 100644
--- a/app/code/Magento/Customer/Test/Unit/Model/AddressTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Model/AddressTest.php
@@ -36,8 +36,7 @@ class AddressTest extends \PHPUnit_Framework_TestCase
*/
protected $resource;
-
- public function setUp()
+ protected function setUp()
{
$this->objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
diff --git a/app/code/Magento/Customer/Test/Unit/Model/App/Action/ContextPluginTest.php b/app/code/Magento/Customer/Test/Unit/Model/App/Action/ContextPluginTest.php
index ba0e3c13ca28..2063c756fda1 100644
--- a/app/code/Magento/Customer/Test/Unit/Model/App/Action/ContextPluginTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Model/App/Action/ContextPluginTest.php
@@ -46,7 +46,7 @@ class ContextPluginTest extends \PHPUnit_Framework_TestCase
/**
* Set up
*/
- public function setUp()
+ protected function setUp()
{
$this->customerSessionMock = $this->getMock(
'Magento\Customer\Model\Session',
diff --git a/app/code/Magento/Customer/Test/Unit/Model/Checkout/ConfigProviderTest.php b/app/code/Magento/Customer/Test/Unit/Model/Checkout/ConfigProviderTest.php
index 286405a121d6..f17936c66daa 100644
--- a/app/code/Magento/Customer/Test/Unit/Model/Checkout/ConfigProviderTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Model/Checkout/ConfigProviderTest.php
@@ -41,7 +41,7 @@ class ConfigProviderTest extends \PHPUnit_Framework_TestCase
*/
protected $store;
- public function setUp()
+ protected function setUp()
{
$this->storeManager = $this->getMockForAbstractClass(
'Magento\Store\Model\StoreManagerInterface',
diff --git a/app/code/Magento/Customer/Test/Unit/Model/Customer/Attribute/Backend/BillingTest.php b/app/code/Magento/Customer/Test/Unit/Model/Customer/Attribute/Backend/BillingTest.php
index b8ee30e16f9e..931fe1992225 100644
--- a/app/code/Magento/Customer/Test/Unit/Model/Customer/Attribute/Backend/BillingTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Model/Customer/Attribute/Backend/BillingTest.php
@@ -14,7 +14,7 @@ class BillingTest extends \PHPUnit_Framework_TestCase
*/
protected $testable;
- public function setUp()
+ protected function setUp()
{
$logger = $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock();
/** @var \Psr\Log\LoggerInterface $logger */
diff --git a/app/code/Magento/Customer/Test/Unit/Model/Customer/Attribute/Backend/PasswordTest.php b/app/code/Magento/Customer/Test/Unit/Model/Customer/Attribute/Backend/PasswordTest.php
index 76a2292c77e5..f6d6a32dccaf 100644
--- a/app/code/Magento/Customer/Test/Unit/Model/Customer/Attribute/Backend/PasswordTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Model/Customer/Attribute/Backend/PasswordTest.php
@@ -16,7 +16,7 @@ class PasswordTest extends \PHPUnit_Framework_TestCase
*/
protected $testable;
- public function setUp()
+ protected function setUp()
{
$string = new StringUtils();
$this->testable = new \Magento\Customer\Model\Customer\Attribute\Backend\Password($string);
diff --git a/app/code/Magento/Customer/Test/Unit/Model/Customer/Attribute/Backend/ShippingTest.php b/app/code/Magento/Customer/Test/Unit/Model/Customer/Attribute/Backend/ShippingTest.php
index 1a55d4d0a969..d363c62e89af 100644
--- a/app/code/Magento/Customer/Test/Unit/Model/Customer/Attribute/Backend/ShippingTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Model/Customer/Attribute/Backend/ShippingTest.php
@@ -15,7 +15,7 @@ class ShippingTest extends \PHPUnit_Framework_TestCase
*/
protected $testable;
- public function setUp()
+ protected function setUp()
{
$logger = $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock();
/** @var \Psr\Log\LoggerInterface $logger */
diff --git a/app/code/Magento/Customer/Test/Unit/Model/Customer/Attribute/Backend/StoreTest.php b/app/code/Magento/Customer/Test/Unit/Model/Customer/Attribute/Backend/StoreTest.php
index 9a0d7f08328d..8fe7a6c0595a 100644
--- a/app/code/Magento/Customer/Test/Unit/Model/Customer/Attribute/Backend/StoreTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Model/Customer/Attribute/Backend/StoreTest.php
@@ -20,7 +20,7 @@ class StoreTest extends \PHPUnit_Framework_TestCase
*/
protected $storeManager;
- public function setUp()
+ protected function setUp()
{
$storeManager = $this->storeManager = $this->getMockBuilder('Magento\Store\Model\StoreManagerInterface')
->getMock();
diff --git a/app/code/Magento/Customer/Test/Unit/Model/Customer/Attribute/Backend/WebsiteTest.php b/app/code/Magento/Customer/Test/Unit/Model/Customer/Attribute/Backend/WebsiteTest.php
index cafb2d42a06b..040a79d99cc9 100644
--- a/app/code/Magento/Customer/Test/Unit/Model/Customer/Attribute/Backend/WebsiteTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Model/Customer/Attribute/Backend/WebsiteTest.php
@@ -20,7 +20,7 @@ class WebsiteTest extends \PHPUnit_Framework_TestCase
*/
protected $storeManager;
- public function setUp()
+ protected function setUp()
{
$storeManager = $this->storeManager = $this->getMockBuilder('Magento\Store\Model\StoreManagerInterface')
->getMock();
diff --git a/app/code/Magento/Customer/Test/Unit/Model/CustomerExtractorTest.php b/app/code/Magento/Customer/Test/Unit/Model/CustomerExtractorTest.php
index 2073eb5de3a5..c414d648b217 100644
--- a/app/code/Magento/Customer/Test/Unit/Model/CustomerExtractorTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Model/CustomerExtractorTest.php
@@ -42,7 +42,7 @@ class CustomerExtractorTest extends \PHPUnit_Framework_TestCase
/** @var \Magento\Customer\Api\Data\GroupInterface|\PHPUnit_Framework_MockObject_MockObject */
protected $customerGroup;
- public function setUp()
+ protected function setUp()
{
$this->formFactory = $this->getMockForAbstractClass(
'Magento\Customer\Model\Metadata\FormFactory',
diff --git a/app/code/Magento/Customer/Test/Unit/Model/CustomerRegistryTest.php b/app/code/Magento/Customer/Test/Unit/Model/CustomerRegistryTest.php
index 7c5dc5351a30..029f73b3e30d 100644
--- a/app/code/Magento/Customer/Test/Unit/Model/CustomerRegistryTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Model/CustomerRegistryTest.php
@@ -36,7 +36,7 @@ class CustomerRegistryTest extends \PHPUnit_Framework_TestCase
const CUSTOMER_EMAIL = 'customer@example.com';
const WEBSITE_ID = 1;
- public function setUp()
+ protected function setUp()
{
$this->customerFactory = $this->getMockBuilder('Magento\Customer\Model\CustomerFactory')
->setMethods(['create'])
diff --git a/app/code/Magento/Customer/Test/Unit/Model/GroupRegistryTest.php b/app/code/Magento/Customer/Test/Unit/Model/GroupRegistryTest.php
index 56830cb31053..4fe2efed4c0f 100644
--- a/app/code/Magento/Customer/Test/Unit/Model/GroupRegistryTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Model/GroupRegistryTest.php
@@ -20,7 +20,7 @@ class GroupRegistryTest extends \PHPUnit_Framework_TestCase
*/
private $groupFactory;
- public function setUp()
+ protected function setUp()
{
$this->groupFactory = $this->getMockBuilder('\Magento\Customer\Model\GroupFactory')
->disableOriginalConstructor()
diff --git a/app/code/Magento/Customer/Test/Unit/Model/Indexer/Attribute/FilterTest.php b/app/code/Magento/Customer/Test/Unit/Model/Indexer/Attribute/FilterTest.php
index 66c7a288def4..3069daec55ec 100644
--- a/app/code/Magento/Customer/Test/Unit/Model/Indexer/Attribute/FilterTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Model/Indexer/Attribute/FilterTest.php
@@ -31,7 +31,7 @@ class FilterTest extends \PHPUnit_Framework_TestCase
/** @var Filter */
protected $model;
- public function setUp()
+ protected function setUp()
{
$this->resource = $this->getMock('Magento\Framework\App\ResourceConnection', [], [], '', false);
$this->connection = $this->getMockForAbstractClass(
diff --git a/app/code/Magento/Customer/Test/Unit/Model/Indexer/AttributeProviderTest.php b/app/code/Magento/Customer/Test/Unit/Model/Indexer/AttributeProviderTest.php
index ff2a1fdf8624..5671a6f4ac3a 100644
--- a/app/code/Magento/Customer/Test/Unit/Model/Indexer/AttributeProviderTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Model/Indexer/AttributeProviderTest.php
@@ -21,7 +21,7 @@ class AttributeProviderTest extends \PHPUnit_Framework_TestCase
*/
protected $object;
- public function setUp()
+ protected function setUp()
{
$this->eavConfig = $this->getMockBuilder('Magento\Eav\Model\Config')
->disableOriginalConstructor()
diff --git a/app/code/Magento/Customer/Test/Unit/Model/Layout/DepersonalizePluginTest.php b/app/code/Magento/Customer/Test/Unit/Model/Layout/DepersonalizePluginTest.php
index 53261e644c0d..54e2a5434cdf 100644
--- a/app/code/Magento/Customer/Test/Unit/Model/Layout/DepersonalizePluginTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Model/Layout/DepersonalizePluginTest.php
@@ -55,7 +55,7 @@ class DepersonalizePluginTest extends \PHPUnit_Framework_TestCase
/**
* SetUp
*/
- public function setUp()
+ protected function setUp()
{
$this->layoutMock = $this->getMock('Magento\Framework\View\Layout', [], [], '', false);
$this->sessionMock = $this->getMock(
diff --git a/app/code/Magento/Customer/Test/Unit/Model/Metadata/ElementFactoryTest.php b/app/code/Magento/Customer/Test/Unit/Model/Metadata/ElementFactoryTest.php
index 4cbcea51adef..bb74afe09eb1 100644
--- a/app/code/Magento/Customer/Test/Unit/Model/Metadata/ElementFactoryTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Model/Metadata/ElementFactoryTest.php
@@ -21,7 +21,7 @@ class ElementFactoryTest extends \PHPUnit_Framework_TestCase
/** @var ElementFactory */
private $_elementFactory;
- public function setUp()
+ protected function setUp()
{
$this->_objectManager = $this->getMock('Magento\Framework\ObjectManagerInterface');
$this->_attributeMetadata = $this->getMock(
diff --git a/app/code/Magento/Customer/Test/Unit/Model/Metadata/ValidatorTest.php b/app/code/Magento/Customer/Test/Unit/Model/Metadata/ValidatorTest.php
index 1db608d797c8..ccd05a111c8c 100644
--- a/app/code/Magento/Customer/Test/Unit/Model/Metadata/ValidatorTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Model/Metadata/ValidatorTest.php
@@ -19,7 +19,7 @@ class ValidatorTest extends \PHPUnit_Framework_TestCase
/** @var \Magento\Customer\Model\Metadata\ElementFactory | \PHPUnit_Framework_MockObject_MockObject */
protected $attrDataFactoryMock;
- public function setUp()
+ protected function setUp()
{
$this->attrDataFactoryMock = $this->getMockBuilder(
'\Magento\Customer\Model\Metadata\ElementFactory'
diff --git a/app/code/Magento/Customer/Test/Unit/Model/Plugin/CustomerRepository/TransactionWrapperTest.php b/app/code/Magento/Customer/Test/Unit/Model/Plugin/CustomerRepository/TransactionWrapperTest.php
new file mode 100644
index 000000000000..314ea794b499
--- /dev/null
+++ b/app/code/Magento/Customer/Test/Unit/Model/Plugin/CustomerRepository/TransactionWrapperTest.php
@@ -0,0 +1,90 @@
+resourceMock = $this->getMock('Magento\Customer\Model\ResourceModel\Customer', [], [], '', false);
+ $this->subjectMock = $this->getMock('Magento\Customer\Api\CustomerRepositoryInterface', [], [], '', false);
+ $this->customerMock = $this->getMock('Magento\Customer\Api\Data\CustomerInterface', [], [], '', false);
+ $customerMock = $this->customerMock;
+ $this->closureMock = function () use ($customerMock) {
+ return $customerMock;
+ };
+ $this->rollbackClosureMock = function () use ($customerMock) {
+ throw new \Exception(self::ERROR_MSG);
+ };
+
+ $this->model = new \Magento\Customer\Model\Plugin\CustomerRepository\TransactionWrapper($this->resourceMock);
+ }
+
+ public function testAroundSaveCommit()
+ {
+ $this->resourceMock->expects($this->once())->method('beginTransaction');
+ $this->resourceMock->expects($this->once())->method('commit');
+
+ $this->assertEquals(
+ $this->customerMock,
+ $this->model->aroundSave($this->subjectMock, $this->closureMock, $this->customerMock, $this->passwordHash)
+ );
+ }
+
+ /**
+ * @expectedException \Exception
+ * @expectedExceptionMessage error occurred
+ */
+ public function testAroundSaveRollBack()
+ {
+ $this->resourceMock->expects($this->once())->method('beginTransaction');
+ $this->resourceMock->expects($this->once())->method('rollBack');
+
+ $this->model->aroundSave(
+ $this->subjectMock,
+ $this->rollbackClosureMock,
+ $this->customerMock,
+ $this->passwordHash
+ );
+ }
+}
diff --git a/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/Address/Attribute/Backend/RegionTest.php b/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/Address/Attribute/Backend/RegionTest.php
index b5f57d0d7118..5855e004a09d 100644
--- a/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/Address/Attribute/Backend/RegionTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/Address/Attribute/Backend/RegionTest.php
@@ -22,7 +22,7 @@ class RegionTest extends \PHPUnit_Framework_TestCase
/** @var \Magento\Directory\Model\Region|\PHPUnit_Framework_MockObject_MockObject */
protected $region;
- public function setUp()
+ protected function setUp()
{
$this->regionFactory = $this->getMock('Magento\Directory\Model\RegionFactory', ['create'], [], '', false);
$this->region = $this->getMock(
diff --git a/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/AddressRepositoryTest.php b/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/AddressRepositoryTest.php
index 60f48c821d5a..50bf0985caf7 100644
--- a/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/AddressRepositoryTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/AddressRepositoryTest.php
@@ -62,7 +62,7 @@ class AddressRepositoryTest extends \PHPUnit_Framework_TestCase
*/
protected $repository;
- public function setUp()
+ protected function setUp()
{
$this->addressFactory = $this->getMock('Magento\Customer\Model\AddressFactory', ['create'], [], '', false);
$this->addressRegistry = $this->getMock('Magento\Customer\Model\AddressRegistry', [], [], '', false);
diff --git a/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/Customer/GridTest.php b/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/Customer/GridTest.php
index 1723573f03fd..e1e6a34ba4a8 100644
--- a/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/Customer/GridTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/Customer/GridTest.php
@@ -33,7 +33,7 @@ class GridTest extends \PHPUnit_Framework_TestCase
/** @var \Zend_Db_Statement_Interface|\PHPUnit_Framework_MockObject_MockObject */
protected $queryResult;
- public function setUp()
+ protected function setUp()
{
$this->resource = $this->getMock('Magento\Framework\App\ResourceConnection', [], [], '', false);
$this->indexerRegistry = $this->getMock('Magento\Framework\Indexer\IndexerRegistry', [], [], '', false);
diff --git a/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/CustomerRepositoryTest.php b/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/CustomerRepositoryTest.php
index 4ffff0e920e0..288644dc42c0 100644
--- a/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/CustomerRepositoryTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/CustomerRepositoryTest.php
@@ -87,8 +87,8 @@ class CustomerRepositoryTest extends \PHPUnit_Framework_TestCase
* @var \Magento\Customer\Model\ResourceModel\CustomerRepository
*/
protected $model;
-
- public function setUp()
+
+ protected function setUp()
{
$this->customerResourceModel =
$this->getMock('Magento\Customer\Model\ResourceModel\Customer', [], [], '', false);
diff --git a/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/Group/Grid/ServiceCollectionTest.php b/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/Group/Grid/ServiceCollectionTest.php
index fd8279a8cce1..13afff437b45 100644
--- a/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/Group/Grid/ServiceCollectionTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/Group/Grid/ServiceCollectionTest.php
@@ -36,7 +36,7 @@ class ServiceCollectionTest extends \PHPUnit_Framework_TestCase
/** @var ServiceCollection */
protected $serviceCollection;
- public function setUp()
+ protected function setUp()
{
$this->objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
$this->filterBuilder = $this->objectManager->getObject('Magento\Framework\Api\FilterBuilder');
diff --git a/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/GroupRepositoryTest.php b/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/GroupRepositoryTest.php
index a7c1fb084826..9d8abd104f44 100644
--- a/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/GroupRepositoryTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/GroupRepositoryTest.php
@@ -71,7 +71,7 @@ class GroupRepositoryTest extends \PHPUnit_Framework_TestCase
*/
protected $model;
- public function setUp()
+ protected function setUp()
{
$this->groupRegistry = $this->getMock(
'Magento\Customer\Model\GroupRegistry',
diff --git a/app/code/Magento/Customer/Test/Unit/Observer/LogLastLoginAtObserverTest.php b/app/code/Magento/Customer/Test/Unit/Observer/LogLastLoginAtObserverTest.php
index 9fa9b31e7092..e49461074d16 100644
--- a/app/code/Magento/Customer/Test/Unit/Observer/LogLastLoginAtObserverTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Observer/LogLastLoginAtObserverTest.php
@@ -28,7 +28,7 @@ class LogLastLoginAtObserverTest extends \PHPUnit_Framework_TestCase
/**
* @return void
*/
- public function setUp()
+ protected function setUp()
{
$this->loggerMock = $this->getMock('Magento\Customer\Model\Logger', [], [], '', false);
$this->logLastLoginAtObserver = new LogLastLoginAtObserver($this->loggerMock);
diff --git a/app/code/Magento/Customer/Test/Unit/Observer/LogLastLogoutAtObserverTest.php b/app/code/Magento/Customer/Test/Unit/Observer/LogLastLogoutAtObserverTest.php
index 372afc6578c5..2fb3b27b5610 100644
--- a/app/code/Magento/Customer/Test/Unit/Observer/LogLastLogoutAtObserverTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Observer/LogLastLogoutAtObserverTest.php
@@ -28,7 +28,7 @@ class LogLastLogoutAtObserverTest extends \PHPUnit_Framework_TestCase
/**
* @return void
*/
- public function setUp()
+ protected function setUp()
{
$this->loggerMock = $this->getMock('Magento\Customer\Model\Logger', [], [], '', false);
$this->logLastLogoutAtObserver = new LogLastLogoutAtObserver($this->loggerMock);
diff --git a/app/code/Magento/Customer/Test/Unit/Ui/Component/ColumnFactoryTest.php b/app/code/Magento/Customer/Test/Unit/Ui/Component/ColumnFactoryTest.php
index 9cea9df13552..f1f91aa57136 100644
--- a/app/code/Magento/Customer/Test/Unit/Ui/Component/ColumnFactoryTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Ui/Component/ColumnFactoryTest.php
@@ -30,7 +30,7 @@ class ColumnFactoryTest extends \PHPUnit_Framework_TestCase
/** @var ColumnFactory */
protected $columnFactory;
- public function setUp()
+ protected function setUp()
{
$this->context = $this->getMockForAbstractClass(
'Magento\Framework\View\Element\UiComponent\ContextInterface',
diff --git a/app/code/Magento/Customer/Test/Unit/Ui/Component/DataProviderTest.php b/app/code/Magento/Customer/Test/Unit/Ui/Component/DataProviderTest.php
index e38030ca9eed..34075f0af9a3 100644
--- a/app/code/Magento/Customer/Test/Unit/Ui/Component/DataProviderTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Ui/Component/DataProviderTest.php
@@ -46,7 +46,7 @@ class DataProviderTest extends \PHPUnit_Framework_TestCase
*/
protected $attributeRepository;
- public function setUp()
+ protected function setUp()
{
$this->reporting = $this->getMockBuilder('Magento\Framework\View\Element\UiComponent\DataProvider\Reporting')
->disableOriginalConstructor()
diff --git a/app/code/Magento/Customer/Test/Unit/Ui/Component/Listing/AttributeRepositoryTest.php b/app/code/Magento/Customer/Test/Unit/Ui/Component/Listing/AttributeRepositoryTest.php
index 5fbe30f45426..e3106318edb6 100644
--- a/app/code/Magento/Customer/Test/Unit/Ui/Component/Listing/AttributeRepositoryTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Ui/Component/Listing/AttributeRepositoryTest.php
@@ -33,7 +33,7 @@ class AttributeRepositoryTest extends \PHPUnit_Framework_TestCase
/** @var AttributeRepository */
protected $component;
- public function setUp()
+ protected function setUp()
{
$this->customerMetadataManagement = $this->getMockForAbstractClass(
'Magento\Customer\Api\CustomerMetadataManagementInterface',
diff --git a/app/code/Magento/Customer/Test/Unit/Ui/Component/Listing/ColumnsTest.php b/app/code/Magento/Customer/Test/Unit/Ui/Component/Listing/ColumnsTest.php
index 4032527049a5..160f04651441 100644
--- a/app/code/Magento/Customer/Test/Unit/Ui/Component/Listing/ColumnsTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Ui/Component/Listing/ColumnsTest.php
@@ -30,7 +30,7 @@ class ColumnsTest extends \PHPUnit_Framework_TestCase
/** @var Columns */
protected $component;
- public function setUp()
+ protected function setUp()
{
$this->context = $this->getMockBuilder('Magento\Framework\View\Element\UiComponent\ContextInterface')
->getMockForAbstractClass();
diff --git a/app/code/Magento/Customer/etc/di.xml b/app/code/Magento/Customer/etc/di.xml
index f92caef79f51..feacdff78a15 100644
--- a/app/code/Magento/Customer/etc/di.xml
+++ b/app/code/Magento/Customer/etc/di.xml
@@ -205,26 +205,6 @@
BillingAddressExpression