Skip to content

Commit

Permalink
MAGETWO-32026: [GitHub] Invalid backend frontname During Installation #…
Browse files Browse the repository at this point in the history
…823

- Changes based on CR feedback.
  • Loading branch information
Safwan Khan authored and eddielau committed Jan 9, 2015
1 parent 852f4aa commit d9d0f45
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,20 @@ public function testGetData()
* @expectedException \InvalidArgumentException
* @expectedExceptionMessage No backend frontname provided.
*/
public function testEmptyData()
public function testUnsetData()
{
new BackendConfig([]);
}

/**
* @expectedException \InvalidArgumentException
* @expectedExceptionMessage Empty backend frontname provided.
*/
public function testEmptyData()
{
new BackendConfig(['frontName' => '']);
}

/**
* @param array $data
* @dataProvider invalidDataDataProvider
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ public function __construct(array $data)
if (!isset($data[self::KEY_FRONTNAME])) {
throw new \InvalidArgumentException("No backend frontname provided.");
}
if ($data[self::KEY_FRONTNAME] === '') {
throw new \InvalidArgumentException("Empty backend frontname provided.");
}
if (!preg_match('/^[a-zA-Z0-9_]+$/', $data[self::KEY_FRONTNAME])) {
throw new \InvalidArgumentException("Invalid backend frontname {$data[self::KEY_FRONTNAME]}");
}
Expand Down
1 change: 1 addition & 0 deletions setup/pub/magento/setup/landing.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ angular.module('landing', ['ngStorage'])
'$location',
'$localStorage',
function ($scope, $location, $localStorage) {
$localStorage.$reset();
$scope.selectLanguage = function () {
$localStorage.lang = $scope.modelLanguage;
window.location = 'index.php/' + $scope.modelLanguage + '/index';
Expand Down
2 changes: 1 addition & 1 deletion setup/pub/magento/setup/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

'use strict';
var main = angular.module('main', ['ngStorage']);
main.controller('navigationController', ['$scope', '$state', '$rootScope', 'navigationService', '$localStorage', function ($scope, $state, $rootScope, navigationService, $localStorage) {
main.controller('navigationController', ['$scope', '$state', '$rootScope', 'navigationService', function ($scope, $state, $rootScope, navigationService) {
navigationService.load();
$rootScope.isMenuEnabled = true;
$scope.itemStatus = function (order) {
Expand Down

0 comments on commit d9d0f45

Please sign in to comment.