Skip to content

Commit 9bb194f

Browse files
author
vpaladiychuk
committed
Merge remote-tracking branch 'origin/MAGETWO-26762' into MAGETWO-34990
2 parents d4b8410 + 0e8eb6b commit 9bb194f

File tree

58 files changed

+1011
-533
lines changed

Some content is hidden

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

58 files changed

+1011
-533
lines changed

app/code/Magento/Backend/Controller/Adminhtml/Auth/Logout.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,6 @@
88

99
class Logout extends \Magento\Backend\Controller\Adminhtml\Auth
1010
{
11-
/**
12-
* @param \Magento\Backend\App\Action\Context $context
13-
*/
14-
public function __construct(
15-
\Magento\Backend\App\Action\Context $context
16-
) {
17-
parent::__construct($context);
18-
}
19-
2011
/**
2112
* Administrator logout action
2213
*

app/code/Magento/Backend/Controller/Adminhtml/Index/ChangeLocale.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,6 @@
88

99
class ChangeLocale extends \Magento\Backend\Controller\Adminhtml\Index
1010
{
11-
/**
12-
* Constructor
13-
*
14-
* @param \Magento\Backend\App\Action\Context $context
15-
*/
16-
public function __construct(
17-
\Magento\Backend\App\Action\Context $context
18-
) {
19-
parent::__construct($context);
20-
}
21-
2211
/**
2312
* Change locale action
2413
*

app/code/Magento/Backend/Controller/Adminhtml/Index/Index.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,6 @@
88

99
class Index extends \Magento\Backend\Controller\Adminhtml\Index
1010
{
11-
/**
12-
* @param \Magento\Backend\App\Action\Context $context
13-
*/
14-
public function __construct(\Magento\Backend\App\Action\Context $context)
15-
{
16-
parent::__construct($context);
17-
}
18-
1911
/**
2012
* Admin area entry point
2113
* Always redirects to the startup page url

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

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,6 @@
99

1010
class Save extends \Magento\Backend\Controller\Adminhtml\System\Account
1111
{
12-
/**
13-
* @param \Magento\Backend\App\Action\Context $context
14-
*/
15-
public function __construct(\Magento\Backend\App\Action\Context $context)
16-
{
17-
parent::__construct($context);
18-
}
19-
2012
/**
2113
* Saving edited user information
2214
*
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<?php
2+
/**
3+
* Copyright © 2015 Magento. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
namespace Magento\Backend\Test\Unit\Model\View\Result;
7+
8+
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper;
9+
10+
class RedirectTest extends \PHPUnit_Framework_TestCase
11+
{
12+
/** @var \Magento\Backend\Model\View\Result\Redirect */
13+
protected $action;
14+
15+
/** @var ObjectManagerHelper */
16+
protected $objectManagerHelper;
17+
18+
/** @var \Magento\Backend\Model\Session|\PHPUnit_Framework_MockObject_MockObject */
19+
protected $session;
20+
21+
/** @var \Magento\Framework\App\ActionFlag|\PHPUnit_Framework_MockObject_MockObject */
22+
protected $actionFlag;
23+
24+
/** @var \Magento\Backend\Model\UrlInterface|\PHPUnit_Framework_MockObject_MockObject */
25+
protected $urlBuilder;
26+
27+
/** @var \Magento\Framework\App\Response\RedirectInterface|\PHPUnit_Framework_MockObject_MockObject */
28+
protected $redirect;
29+
30+
protected $url = 'adminhtml/index';
31+
32+
protected function setUp()
33+
{
34+
$this->session = $this->getMock('Magento\Backend\Model\Session', [], [], '', false);
35+
$this->actionFlag = $this->getMock('Magento\Framework\App\ActionFlag', [], [], '', false);
36+
$this->urlBuilder = $this->getMock('Magento\Backend\Model\UrlInterface', [], [], '', false);
37+
$this->redirect = $this->getMock(
38+
'Magento\Framework\App\Response\RedirectInterface',
39+
[],
40+
[],
41+
'',
42+
false
43+
);
44+
$this->objectManagerHelper = new ObjectManagerHelper($this);
45+
$this->action = $this->objectManagerHelper->getObject(
46+
'Magento\Backend\Model\View\Result\Redirect',
47+
[
48+
'session' => $this->session,
49+
'actionFlag' => $this->actionFlag,
50+
'redirect' => $this->redirect,
51+
'urlBuilder' =>$this->urlBuilder,
52+
]
53+
);
54+
}
55+
56+
public function testSetRefererOrBaseUrl()
57+
{
58+
$this->urlBuilder->expects($this->once())->method('getUrl')->willReturn($this->url);
59+
$this->redirect->expects($this->once())->method('getRedirectUrl')->with($this->url)->willReturn('test string');
60+
$this->action->setRefererOrBaseUrl();
61+
}
62+
}

app/code/Magento/Catalog/Controller/Adminhtml/Category.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,6 @@
1010
*/
1111
class Category extends \Magento\Backend\App\Action
1212
{
13-
/**
14-
* @param \Magento\Backend\App\Action\Context $context
15-
*/
16-
public function __construct(
17-
\Magento\Backend\App\Action\Context $context
18-
) {
19-
parent::__construct($context);
20-
}
21-
2213
/**
2314
* Initialize requested category and put it into registry.
2415
* Root category can be returned, if inappropriate store/category is specified

app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Delete.php

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,6 @@
88

99
class Delete extends \Magento\Catalog\Controller\Adminhtml\Product\Attribute
1010
{
11-
/**
12-
* Constructor
13-
*
14-
* @param \Magento\Backend\App\Action\Context $context
15-
* @param \Magento\Framework\Cache\FrontendInterface $attributeLabelCache
16-
* @param \Magento\Framework\Registry $coreRegistry
17-
* @param \Magento\Framework\View\Result\PageFactory $resultPageFactory
18-
*/
19-
public function __construct(
20-
\Magento\Backend\App\Action\Context $context,
21-
\Magento\Framework\Cache\FrontendInterface $attributeLabelCache,
22-
\Magento\Framework\Registry $coreRegistry,
23-
\Magento\Framework\View\Result\PageFactory $resultPageFactory
24-
) {
25-
parent::__construct($context, $attributeLabelCache, $coreRegistry, $resultPageFactory);
26-
}
27-
2811
/**
2912
* @return \Magento\Backend\Model\View\Result\Redirect
3013
*/

app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Edit.php

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,8 @@
66
*/
77
namespace Magento\Catalog\Controller\Adminhtml\Product\Attribute;
88

9-
use Magento\Backend\App\Action;
10-
use Magento\Framework\View\Result\PageFactory;
11-
129
class Edit extends \Magento\Catalog\Controller\Adminhtml\Product\Attribute
1310
{
14-
/**
15-
* Constructor
16-
*
17-
* @param Action\Context $context
18-
* @param \Magento\Framework\Cache\FrontendInterface $attributeLabelCache
19-
* @param \Magento\Framework\Registry $coreRegistry
20-
* @param PageFactory $resultPageFactory
21-
*/
22-
public function __construct(
23-
\Magento\Backend\App\Action\Context $context,
24-
\Magento\Framework\Cache\FrontendInterface $attributeLabelCache,
25-
\Magento\Framework\Registry $coreRegistry,
26-
PageFactory $resultPageFactory
27-
) {
28-
parent::__construct($context, $attributeLabelCache, $coreRegistry, $resultPageFactory);
29-
}
30-
3111
/**
3212
* @return \Magento\Framework\Controller\ResultInterface
3313
* @SuppressWarnings(PHPMD.NPathComplexity)

app/code/Magento/Catalog/Controller/Adminhtml/Product/MassDelete.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,6 @@
88

99
class MassDelete extends \Magento\Catalog\Controller\Adminhtml\Product
1010
{
11-
/**
12-
* @param \Magento\Backend\App\Action\Context $context
13-
* @param \Magento\Catalog\Controller\Adminhtml\Product\Builder $productBuilder
14-
*/
15-
public function __construct(
16-
\Magento\Backend\App\Action\Context $context,
17-
\Magento\Catalog\Controller\Adminhtml\Product\Builder $productBuilder
18-
) {
19-
parent::__construct($context, $productBuilder);
20-
}
21-
2211
/**
2312
* @return \Magento\Backend\Model\View\Result\Redirect
2413
*/

app/code/Magento/Catalog/Controller/Index/Index.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,8 @@
55
*/
66
namespace Magento\Catalog\Controller\Index;
77

8-
use Magento\Framework\App\Action\Context;
9-
108
class Index extends \Magento\Framework\App\Action\Action
119
{
12-
/**
13-
* Constructor
14-
*
15-
* @param Context $context
16-
*/
17-
public function __construct(
18-
Context $context
19-
) {
20-
parent::__construct($context);
21-
}
22-
2310
/**
2411
* Index action
2512
*

0 commit comments

Comments
 (0)