Skip to content

Commit b206aad

Browse files
author
Bohdan Korablov
committed
MAGETWO-65208: Store checksum for every section of configuration file & change behavior on read-only FS & add sorting of importers
1 parent b139eec commit b206aad

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

app/code/Magento/Deploy/Model/Plugin/ConfigValidator.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
namespace Magento\Deploy\Model\Plugin;
77

88
use Magento\Deploy\Model\DeploymentConfig\Validator as DeploymentConfigValidator;
9-
use Magento\Framework\App\FrontController;
9+
use Magento\Framework\App\FrontControllerInterface;
1010
use Magento\Framework\App\RequestInterface;
1111
use Magento\Framework\Exception\LocalizedException;
1212

@@ -37,13 +37,13 @@ public function __construct(DeploymentConfigValidator $configValidator)
3737
/**
3838
* Performs check that config data from deployment configuration files is valid.
3939
*
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
4141
* @param RequestInterface $request the object that contains request params
4242
* @return void
4343
* @throws LocalizedException is thrown if config data from deployment configuration files is not valid
4444
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
4545
*/
46-
public function beforeDispatch(FrontController $subject, RequestInterface $request)
46+
public function beforeDispatch(FrontControllerInterface $subject, RequestInterface $request)
4747
{
4848
if (!$this->configValidator->isValid()) {
4949
throw new LocalizedException(

app/code/Magento/Deploy/Test/Unit/Model/Plugin/ConfigValidatorTest.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
use Magento\Deploy\Model\Plugin\ConfigValidator;
99
use Magento\Deploy\Model\DeploymentConfig\Validator;
10-
use Magento\Framework\App\FrontController;
10+
use Magento\Framework\App\FrontControllerInterface;
1111
use Magento\Framework\App\RequestInterface;
1212

1313
class ConfigValidatorTest extends \PHPUnit_Framework_TestCase
@@ -23,7 +23,7 @@ class ConfigValidatorTest extends \PHPUnit_Framework_TestCase
2323
private $configValidatorMock;
2424

2525
/**
26-
* @var FrontController|\PHPUnit_Framework_MockObject_MockObject
26+
* @var FrontControllerInterface|\PHPUnit_Framework_MockObject_MockObject
2727
*/
2828
private $frontControllerMock;
2929

@@ -40,9 +40,8 @@ protected function setUp()
4040
$this->configValidatorMock = $this->getMockBuilder(Validator::class)
4141
->disableOriginalConstructor()
4242
->getMock();
43-
$this->frontControllerMock = $this->getMockBuilder(FrontController::class)
44-
->disableOriginalConstructor()
45-
->getMock();
43+
$this->frontControllerMock = $this->getMockBuilder(FrontControllerInterface::class)
44+
->getMockForAbstractClass();
4645
$this->requestMock = $this->getMockBuilder(RequestInterface::class)
4746
->getMockForAbstractClass();
4847

0 commit comments

Comments
 (0)