diff --git a/app/code/Magento/Developer/Model/View/Asset/PreProcessor/DeveloperChain.php b/app/code/Magento/Developer/Model/View/Asset/PreProcessor/DeveloperChain.php index 636b5418fb58d9d7922bbdb40d0c1b39257af77f..9703008ff7dafd06debf523eeb0c02b2896ee563 100644 --- a/app/code/Magento/Developer/Model/View/Asset/PreProcessor/DeveloperChain.php +++ b/app/code/Magento/Developer/Model/View/Asset/PreProcessor/DeveloperChain.php @@ -6,7 +6,6 @@ namespace Magento\Developer\Model\View\Asset\PreProcessor; use Magento\Framework\View\Asset\PreProcessor\Chain; -use Magento\Developer\Model\Config\Source\WorkflowType; use Magento\Framework\View\Asset\LocalInterface; class DeveloperChain extends Chain @@ -16,7 +15,6 @@ class DeveloperChain extends Chain * @param string $origContent * @param string $origContentType * @param null $origAssetPath - * @param null $frontEndDevelopmentWorkflowType */ public function __construct( LocalInterface $asset, diff --git a/app/code/Magento/Developer/Test/Unit/Model/VIew/Asset/PreProcessor/DeveloperChainTest.php b/app/code/Magento/Developer/Test/Unit/Model/VIew/Asset/PreProcessor/DeveloperChainTest.php deleted file mode 100644 index 16a9f8a78c448c91babb211b505e4544094bf31e..0000000000000000000000000000000000000000 --- a/app/code/Magento/Developer/Test/Unit/Model/VIew/Asset/PreProcessor/DeveloperChainTest.php +++ /dev/null @@ -1,50 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Developer\Test\Unit\Model\View\Asset\PreProcessor; - -use Magento\Framework\View\Asset\LocalInterface; -use Magento\Developer\Model\View\Asset\PreProcessor\DeveloperChain; - -class DeveloperChainTest extends \PHPUnit_Framework_TestCase -{ - /** - * @var LocalInterface|\PHPUnit_Framework_MockObject_MockObject - */ - private $asset; - - /** - * @var DeveloperChain - */ - private $object; - - protected function setUp() - { - $this->asset = $this->getMockForAbstractClass('\Magento\Framework\View\Asset\LocalInterface'); - } - - public function testChainTargetAssetPathDevMode() - { - $assetPath = 'assetPath'; - $origPath = 'origPath'; - - $this->asset = $this->getMockForAbstractClass('\Magento\Framework\View\Asset\LocalInterface'); - $this->asset->expects($this->once()) - ->method('getContentType') - ->will($this->returnValue('assetType')); - $this->asset->expects($this->once()) - ->method('getPath') - ->will($this->returnValue($assetPath)); - $this->object = new DeveloperChain( - $this->asset, - 'origContent', - 'origType', - $origPath - ); - - $this->assertSame($this->object->getTargetAssetPath(), $origPath); - $this->assertNotSame($this->object->getTargetAssetPath(), $assetPath); - } -} diff --git a/lib/internal/Magento/Framework/View/Asset/PreProcessor/ChainFactory.php b/lib/internal/Magento/Framework/View/Asset/PreProcessor/ChainFactory.php index c9e8d8d06db1c7523d94d364eb4504d8ff899baf..e817380eff140e92907eb8ffdc453495e0158d86 100644 --- a/lib/internal/Magento/Framework/View/Asset/PreProcessor/ChainFactory.php +++ b/lib/internal/Magento/Framework/View/Asset/PreProcessor/ChainFactory.php @@ -30,15 +30,13 @@ class ChainFactory implements ChainFactoryInterface */ public function create(array $arguments = []) { - $arguments = array_diff_key( + $arguments = array_intersect_key( $arguments, - array_flip( - [ - 'asset', - 'origContent', - 'origContentType' - ] - ) + [ + 'asset' => 'asset', + 'origContent' => 'origContent', + 'origContentType' => 'origContentType' + ] ); return $this->_objectManager->create('Magento\Framework\View\Asset\PreProcessor\Chain', $arguments); }