Skip to content

Commit cb750fd

Browse files
committed
Merge pull request #296 from magento-ogre/PR_Branch
[Ogres] Sprint 29
2 parents 36b3a69 + 9d0af38 commit cb750fd

File tree

343 files changed

+5012
-3061
lines changed

Some content is hidden

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

343 files changed

+5012
-3061
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ atlassian*
1010
/.gitattributes
1111
/app/config_sandbox
1212
/app/etc/config.php
13+
/app/etc/env.php
1314
/app/code/Magento/TestModule*
1415
/lib/internal/flex/uploader/.actionScriptProperties
1516
/lib/internal/flex/uploader/.flexProperties

app/code/Magento/AdminNotification/Model/Feed.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
namespace Magento\AdminNotification\Model;
77

8-
use Magento\Framework\Config\ConfigOptionsList;
8+
use Magento\Framework\Config\ConfigOptionsListConstants;
99

1010
/**
1111
* AdminNotification Feed model
@@ -137,7 +137,7 @@ public function checkUpdate()
137137

138138
$feedXml = $this->getFeedData();
139139

140-
$installDate = strtotime($this->_deploymentConfig->get(ConfigOptionsList::CONFIG_PATH_INSTALL_DATE));
140+
$installDate = strtotime($this->_deploymentConfig->get(ConfigOptionsListConstants::CONFIG_PATH_INSTALL_DATE));
141141

142142
if ($feedXml && $feedXml->channel && $feedXml->channel->item) {
143143
foreach ($feedXml->channel->item as $item) {

app/code/Magento/AdminNotification/Test/Unit/Model/FeedTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
namespace Magento\AdminNotification\Test\Unit\Model;
88

99
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper;
10-
use Magento\Framework\Config\ConfigOptionsList;
10+
use Magento\Framework\Config\ConfigOptionsListConstants;
1111

1212
/**
1313
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
@@ -141,7 +141,7 @@ public function testCheckUpdate($callInbox, $curlRequest)
141141
$this->backendConfig->expects($this->at(1))->method('getValue')
142142
->will($this->returnValue('http://feed.magento.com'));
143143
$this->deploymentConfig->expects($this->once())->method('get')
144-
->with(ConfigOptionsList::CONFIG_PATH_INSTALL_DATE)
144+
->with(ConfigOptionsListConstants::CONFIG_PATH_INSTALL_DATE)
145145
->will($this->returnValue('Sat, 6 Sep 2014 16:46:11 UTC'));
146146
if ($callInbox) {
147147
$this->inboxFactory->expects($this->once())->method('create')

app/code/Magento/Backend/App/AbstractAction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ public function _processUrlKeys()
285285
protected function _processLocaleSettings()
286286
{
287287
$forceLocale = $this->getRequest()->getParam('locale', null);
288-
if ($this->_objectManager->get('Magento\Framework\Locale\Validator')->isValid($forceLocale)) {
288+
if ($this->_objectManager->get('Magento\Framework\Validator\Locale')->isValid($forceLocale)) {
289289
$this->_getSession()->setSessionLocale($forceLocale);
290290
}
291291

app/code/Magento/Backend/Controller/Adminhtml/System/Account/Save.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function execute()
3333
->setLastname($this->getRequest()->getParam('lastname', false))
3434
->setEmail(strtolower($this->getRequest()->getParam('email', false)));
3535

36-
if ($this->_objectManager->get('Magento\Framework\Locale\Validator')->isValid($interfaceLocale)) {
36+
if ($this->_objectManager->get('Magento\Framework\Validator\Locale')->isValid($interfaceLocale)) {
3737
$user->setInterfaceLocale($interfaceLocale);
3838
/** @var \Magento\Backend\Model\Locale\Manager $localeManager */
3939
$localeManager = $this->_objectManager->get('Magento\Backend\Model\Locale\Manager');

app/code/Magento/Backend/Helper/Dashboard/Data.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
namespace Magento\Backend\Helper\Dashboard;
77

88
use Magento\Framework\App\DeploymentConfig;
9-
use Magento\Framework\Config\ConfigOptionsList;
9+
use Magento\Framework\Config\ConfigOptionsListConstants;
1010

1111
/**
1212
* Data helper for dashboard
@@ -41,7 +41,7 @@ public function __construct(
4141
parent::__construct(
4242
$context
4343
);
44-
$this->_installDate = $deploymentConfig->get(ConfigOptionsList::CONFIG_PATH_INSTALL_DATE);
44+
$this->_installDate = $deploymentConfig->get(ConfigOptionsListConstants::CONFIG_PATH_INSTALL_DATE);
4545
$this->_storeManager = $storeManager;
4646
}
4747

app/code/Magento/Backend/Model/Locale/Resolver.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class Resolver extends \Magento\Framework\Locale\Resolver
2626
protected $_request;
2727

2828
/**
29-
* @var \Magento\Framework\Locale\Validator
29+
* @var \Magento\Framework\Validator\Locale
3030
*/
3131
protected $_localeValidator;
3232

@@ -37,7 +37,7 @@ class Resolver extends \Magento\Framework\Locale\Resolver
3737
* @param \Magento\Backend\Model\Session $session
3838
* @param Manager $localeManager
3939
* @param \Magento\Framework\App\RequestInterface $request
40-
* @param \Magento\Framework\Locale\Validator $localeValidator
40+
* @param \Magento\Framework\Validator\Locale $localeValidator
4141
* @param null $locale
4242
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
4343
*/
@@ -48,7 +48,7 @@ public function __construct(
4848
\Magento\Backend\Model\Session $session,
4949
\Magento\Backend\Model\Locale\Manager $localeManager,
5050
\Magento\Framework\App\RequestInterface $request,
51-
\Magento\Framework\Locale\Validator $localeValidator,
51+
\Magento\Framework\Validator\Locale $localeValidator,
5252
$locale = null
5353
) {
5454
$this->_session = $session;

app/code/Magento/Backend/Setup/ConfigOptionsList.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class ConfigOptionsList implements ConfigOptionsListInterface
1919
/**
2020
* Input key for the options
2121
*/
22-
const INPUT_KEY_BACKEND_FRONTNAME = 'backend_frontname';
22+
const INPUT_KEY_BACKEND_FRONTNAME = 'backend-frontname';
2323

2424
/**
2525
* Path to the values in the deployment config
@@ -48,7 +48,7 @@ public function getOptions()
4848
*/
4949
public function createConfig(array $options, DeploymentConfig $deploymentConfig)
5050
{
51-
$configData = new ConfigData(ConfigFilePool::APP_CONFIG);
51+
$configData = new ConfigData(ConfigFilePool::APP_ENV);
5252

5353
if (isset($options[self::INPUT_KEY_BACKEND_FRONTNAME])) {
5454
$configData->set(self::CONFIG_PATH_BACKEND_FRONTNAME, $options[self::INPUT_KEY_BACKEND_FRONTNAME]);
@@ -60,7 +60,7 @@ public function createConfig(array $options, DeploymentConfig $deploymentConfig)
6060
/**
6161
* {@inheritdoc}
6262
*/
63-
public function validate(array $options)
63+
public function validate(array $options, DeploymentConfig $deploymentConfig)
6464
{
6565
$errors = [];
6666
if (isset($options[self::INPUT_KEY_BACKEND_FRONTNAME])

app/code/Magento/Backend/Test/Unit/Controller/Adminhtml/System/Account/SaveTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class SaveTest extends \PHPUnit_Framework_TestCase
3333
/** @var \PHPUnit_Framework_MockObject_MockObject|\Magento\User\Model\User */
3434
protected $_userMock;
3535

36-
/** @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\Locale\Validator */
36+
/** @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\Validator\locale */
3737
protected $_validatorMock;
3838

3939
/** @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Backend\Model\Locale\Manager */
@@ -80,7 +80,7 @@ protected function setUp()
8080
)
8181
->getMock();
8282

83-
$this->_validatorMock = $this->getMockBuilder('Magento\Framework\Locale\Validator')
83+
$this->_validatorMock = $this->getMockBuilder('Magento\Framework\Validator\Locale')
8484
->disableOriginalConstructor()
8585
->setMethods(['isValid'])
8686
->getMock();
@@ -172,7 +172,7 @@ public function testSaveAction()
172172
)->method(
173173
'get'
174174
)->with(
175-
$this->equalTo('Magento\Framework\Locale\Validator')
175+
$this->equalTo('Magento\Framework\Validator\Locale')
176176
)->will(
177177
$this->returnValue($this->_validatorMock)
178178
);

app/code/Magento/Backend/Test/Unit/Setup/ConfigOptionsListTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function testCreateConfig()
4242

4343
$expectedData = [
4444
[
45-
'file' => ConfigFilePool::APP_CONFIG,
45+
'file' => ConfigFilePool::APP_ENV,
4646
'segment' => 'backend',
4747
'data' => [
4848
'backend' => ['frontName' => 'admin']
@@ -62,7 +62,7 @@ public function testCreateConfig()
6262
public function testValidate()
6363
{
6464
$options = [ConfigOptionsList::INPUT_KEY_BACKEND_FRONTNAME => 'admin'];
65-
$errors = $this->object->validate($options);
65+
$errors = $this->object->validate($options, $this->deploymentConfig);
6666
$this->assertEmpty($errors);
6767
}
6868

@@ -73,7 +73,7 @@ public function testValidate()
7373
*/
7474
public function testValidateInvalid(array $options, $expectedError)
7575
{
76-
$errors = $this->object->validate($options);
76+
$errors = $this->object->validate($options, $this->deploymentConfig);
7777
$this->assertSame([$expectedError], $errors);
7878
}
7979

0 commit comments

Comments
 (0)