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,7 @@ 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 ($ this ->logger , $ this ->mergeStrategy , $ this ->assetRepo , $ this -> versionStorage , []);
7885 }
7986
8087 /**
@@ -89,6 +96,7 @@ public function testConstructorRequireMergeInterface()
8996 'logger ' => $ this ->logger ,
9097 'mergeStrategy ' => $ this ->mergeStrategy ,
9198 'assetRepo ' => $ this ->assetRepo ,
99+ 'versionStorage ' => $ this ->versionStorage ,
92100 'assets ' => [$ this ->assetJsOne , $ assetUrl ],
93101 ]);
94102 }
@@ -108,6 +116,7 @@ public function testConstructorIncompatibleContentTypes()
108116 'logger ' => $ this ->logger ,
109117 'mergeStrategy ' => $ this ->mergeStrategy ,
110118 'assetRepo ' => $ this ->assetRepo ,
119+ 'versionStorage ' => $ this ->versionStorage ,
111120 'assets ' => [$ this ->assetJsOne , $ assetCss ],
112121 ]);
113122 }
@@ -123,6 +132,7 @@ public function testIteratorInterfaceMerge()
123132 'logger ' => $ this ->logger ,
124133 'mergeStrategy ' => $ this ->mergeStrategy ,
125134 'assetRepo ' => $ this ->assetRepo ,
135+ 'versionStorage ' => $ this ->versionStorage ,
126136 'assets ' => $ assets ,
127137 ]);
128138
@@ -157,6 +167,7 @@ public function testIteratorInterfaceMergeFailure()
157167 'logger ' => $ this ->logger ,
158168 'mergeStrategy ' => $ this ->mergeStrategy ,
159169 'assetRepo ' => $ this ->assetRepo ,
170+ 'versionStorage ' => $ this ->versionStorage ,
160171 'assets ' => [$ this ->assetJsOne , $ this ->assetJsTwo , $ assetBroken ],
161172 ]);
162173
0 commit comments