1212use Magento \Framework \View \Asset \Repository as AssetRepository ;
1313use Magento \Framework \View \Asset \MergeableInterface ;
1414use Magento \Framework \View \Asset \MergeStrategyInterface ;
15+ use Magento \Framework \App \View \Deployment \Version \StorageInterface ;
1516
1617/**
1718 * Class MergedTest
@@ -43,6 +44,11 @@ class MergedTest extends \PHPUnit\Framework\TestCase
4344 */
4445 private $ assetRepo ;
4546
47+ /**
48+ * @var StorageInterface|\PHPUnit_Framework_MockObject_MockObject
49+ */
50+ private $ versionStorage ;
51+
4652 protected function setUp ()
4753 {
4854 $ this ->assetJsOne = $ this ->getMockForAbstractClass (MergeableInterface::class);
@@ -66,6 +72,7 @@ protected function setUp()
6672 $ this ->assetRepo = $ this ->getMockBuilder (AssetRepository::class)
6773 ->disableOriginalConstructor ()
6874 ->getMock ();
75+ $ this ->versionStorage = $ this ->createMock (StorageInterface::class);
6976 }
7077
7178 /**
@@ -74,7 +81,13 @@ protected function setUp()
7481 */
7582 public function testConstructorNothingToMerge ()
7683 {
77- new \Magento \Framework \View \Asset \Merged ($ this ->logger , $ this ->mergeStrategy , $ this ->assetRepo , []);
84+ new \Magento \Framework \View \Asset \Merged (
85+ $ this ->logger ,
86+ $ this ->mergeStrategy ,
87+ $ this ->assetRepo ,
88+ [],
89+ $ this ->versionStorage
90+ );
7891 }
7992
8093 /**
@@ -90,6 +103,7 @@ public function testConstructorRequireMergeInterface()
90103 'mergeStrategy ' => $ this ->mergeStrategy ,
91104 'assetRepo ' => $ this ->assetRepo ,
92105 'assets ' => [$ this ->assetJsOne , $ assetUrl ],
106+ 'versionStorage ' => $ this ->versionStorage ,
93107 ]);
94108 }
95109
@@ -109,6 +123,7 @@ public function testConstructorIncompatibleContentTypes()
109123 'mergeStrategy ' => $ this ->mergeStrategy ,
110124 'assetRepo ' => $ this ->assetRepo ,
111125 'assets ' => [$ this ->assetJsOne , $ assetCss ],
126+ 'versionStorage ' => $ this ->versionStorage ,
112127 ]);
113128 }
114129
@@ -124,6 +139,7 @@ public function testIteratorInterfaceMerge()
124139 'mergeStrategy ' => $ this ->mergeStrategy ,
125140 'assetRepo ' => $ this ->assetRepo ,
126141 'assets ' => $ assets ,
142+ 'versionStorage ' => $ this ->versionStorage ,
127143 ]);
128144
129145 $ mergedAsset = $ this ->createMock (\Magento \Framework \View \Asset \File::class);
@@ -158,6 +174,7 @@ public function testIteratorInterfaceMergeFailure()
158174 'mergeStrategy ' => $ this ->mergeStrategy ,
159175 'assetRepo ' => $ this ->assetRepo ,
160176 'assets ' => [$ this ->assetJsOne , $ this ->assetJsTwo , $ assetBroken ],
177+ 'versionStorage ' => $ this ->versionStorage ,
161178 ]);
162179
163180 $ this ->logger ->expects ($ this ->once ())->method ('critical ' )->with ($ this ->identicalTo ($ mergeError ));
0 commit comments