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 a96ef445700e8fb2dce29ddb4803aec4d5573828..636b5418fb58d9d7922bbdb40d0c1b39257af77f 100644 --- a/app/code/Magento/Developer/Model/View/Asset/PreProcessor/DeveloperChain.php +++ b/app/code/Magento/Developer/Model/View/Asset/PreProcessor/DeveloperChain.php @@ -27,8 +27,7 @@ class DeveloperChain extends Chain parent::__construct( $asset, $origContent, - $origContentType, - $origAssetPath + $origContentType ); $this->targetContentType = $this->origContentType; diff --git a/app/code/Magento/Developer/Model/View/Asset/PreProcessor/DeveloperChainFactory.php b/app/code/Magento/Developer/Model/View/Asset/PreProcessor/DeveloperChainFactory.php index ee0e0af6733f08296429adb671d90818af5e931c..dff0dc015aa087f818829cbb4bebc41450a2c67d 100644 --- a/app/code/Magento/Developer/Model/View/Asset/PreProcessor/DeveloperChainFactory.php +++ b/app/code/Magento/Developer/Model/View/Asset/PreProcessor/DeveloperChainFactory.php @@ -9,7 +9,6 @@ use Magento\Framework\App\Config\ScopeConfigInterface; use Magento\Framework\View\Asset\PreProcessor\ChainFactory; use Magento\Framework\View\Asset\PreProcessor\ChainFactoryInterface; use Magento\Framework\ObjectManagerInterface; -use Magento\Framework\View\Asset\PreProcessor\Chain; use Magento\Developer\Model\Config\Source\WorkflowType; class DeveloperChainFactory implements ChainFactoryInterface diff --git a/lib/internal/Magento/Framework/View/Asset/PreProcessor/Chain.php b/lib/internal/Magento/Framework/View/Asset/PreProcessor/Chain.php index 0735e5e9915cd83e71015b6dddf8f1444a5af241..29675401aaea455537f48e11af267a689e42e764 100644 --- a/lib/internal/Magento/Framework/View/Asset/PreProcessor/Chain.php +++ b/lib/internal/Magento/Framework/View/Asset/PreProcessor/Chain.php @@ -51,15 +51,13 @@ class Chain /** * @param LocalInterface $asset - * @param string $origContent - * @param string $origContentType - * @param null $origAssetPath + * @param $origContent + * @param $origContentType */ public function __construct( LocalInterface $asset, $origContent, - $origContentType, - $origAssetPath = null + $origContentType ) { $this->asset = $asset; $this->origContent = $origContent; diff --git a/lib/internal/Magento/Framework/View/Asset/PreProcessor/ChainFactory.php b/lib/internal/Magento/Framework/View/Asset/PreProcessor/ChainFactory.php index 6dda0dfb1feb5e1fbdd90257b255cba5a6ab9272..c9e8d8d06db1c7523d94d364eb4504d8ff899baf 100644 --- a/lib/internal/Magento/Framework/View/Asset/PreProcessor/ChainFactory.php +++ b/lib/internal/Magento/Framework/View/Asset/PreProcessor/ChainFactory.php @@ -30,6 +30,16 @@ class ChainFactory implements ChainFactoryInterface */ public function create(array $arguments = []) { + $arguments = array_diff_key( + $arguments, + array_flip( + [ + 'asset', + 'origContent', + 'origContentType' + ] + ) + ); return $this->_objectManager->create('Magento\Framework\View\Asset\PreProcessor\Chain', $arguments); } } diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Asset/PreProcessor/ChainTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Asset/PreProcessor/ChainTest.php index 4752d354bc3db4a21d6023ce135bb6e2932d5e75..e0c4e8b4d7003c5a88e7d6194e8117574be2bc9c 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/Asset/PreProcessor/ChainTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Asset/PreProcessor/ChainTest.php @@ -90,22 +90,4 @@ class ChainTest extends \PHPUnit_Framework_TestCase ['anotherContent', 'anotherType', true], ]; } - - public function testChainTargetAssetPathNonDevMode() - { - $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)); - $chain = new Chain($this->asset, 'origContent', 'origType', $origPath); - - $this->assertSame($chain->getTargetAssetPath(), $assetPath); - $this->assertNotSame($chain->getTargetAssetPath(), $origPath); - } } diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Page/Config/RendererTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Page/Config/RendererTest.php index e8779e6c6e5cd226fc555fab328c81868d28c794..e407988f77df31cddaa18ff21d82c26401b4f078 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/Page/Config/RendererTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Page/Config/RendererTest.php @@ -73,7 +73,9 @@ class RendererTest extends \PHPUnit_Framework_TestCase */ protected $titleMock; - /** @var ObjectManager */ + /** + * @var ObjectManager + */ protected $objectManagerHelper; protected function setUp() @@ -119,7 +121,7 @@ class RendererTest extends \PHPUnit_Framework_TestCase ->disableOriginalConstructor() ->getMock(); - $this->objectManagerHelper = new ObjectManager($this);; + $this->objectManagerHelper = new ObjectManager($this); $this->renderer = $this->objectManagerHelper->getObject( 'Magento\Framework\View\Page\Config\Renderer', [