File tree Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change 6
6
namespace Magento \Deploy \Model \Plugin ;
7
7
8
8
use Magento \Deploy \Model \DeploymentConfig \Validator as DeploymentConfigValidator ;
9
- use Magento \Framework \App \FrontController ;
9
+ use Magento \Framework \App \FrontControllerInterface ;
10
10
use Magento \Framework \App \RequestInterface ;
11
11
use Magento \Framework \Exception \LocalizedException ;
12
12
@@ -37,13 +37,13 @@ public function __construct(DeploymentConfigValidator $configValidator)
37
37
/**
38
38
* Performs check that config data from deployment configuration files is valid.
39
39
*
40
- * @param FrontController $subject the object of controller is wrapped by this plugin
40
+ * @param FrontControllerInterface $subject the interface of frontend controller is wrapped by this plugin
41
41
* @param RequestInterface $request the object that contains request params
42
42
* @return void
43
43
* @throws LocalizedException is thrown if config data from deployment configuration files is not valid
44
44
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
45
45
*/
46
- public function beforeDispatch (FrontController $ subject , RequestInterface $ request )
46
+ public function beforeDispatch (FrontControllerInterface $ subject , RequestInterface $ request )
47
47
{
48
48
if (!$ this ->configValidator ->isValid ()) {
49
49
throw new LocalizedException (
Original file line number Diff line number Diff line change 7
7
8
8
use Magento \Deploy \Model \Plugin \ConfigValidator ;
9
9
use Magento \Deploy \Model \DeploymentConfig \Validator ;
10
- use Magento \Framework \App \FrontController ;
10
+ use Magento \Framework \App \FrontControllerInterface ;
11
11
use Magento \Framework \App \RequestInterface ;
12
12
13
13
class ConfigValidatorTest extends \PHPUnit_Framework_TestCase
@@ -23,7 +23,7 @@ class ConfigValidatorTest extends \PHPUnit_Framework_TestCase
23
23
private $ configValidatorMock ;
24
24
25
25
/**
26
- * @var FrontController |\PHPUnit_Framework_MockObject_MockObject
26
+ * @var FrontControllerInterface |\PHPUnit_Framework_MockObject_MockObject
27
27
*/
28
28
private $ frontControllerMock ;
29
29
@@ -40,9 +40,8 @@ protected function setUp()
40
40
$ this ->configValidatorMock = $ this ->getMockBuilder (Validator::class)
41
41
->disableOriginalConstructor ()
42
42
->getMock ();
43
- $ this ->frontControllerMock = $ this ->getMockBuilder (FrontController::class)
44
- ->disableOriginalConstructor ()
45
- ->getMock ();
43
+ $ this ->frontControllerMock = $ this ->getMockBuilder (FrontControllerInterface::class)
44
+ ->getMockForAbstractClass ();
46
45
$ this ->requestMock = $ this ->getMockBuilder (RequestInterface::class)
47
46
->getMockForAbstractClass ();
48
47
You can’t perform that action at this time.
0 commit comments