12
12
use Magento \Framework \View \Asset \Repository as AssetRepository ;
13
13
use Magento \Framework \View \Asset \MergeableInterface ;
14
14
use Magento \Framework \View \Asset \MergeStrategyInterface ;
15
+ use Magento \Framework \App \View \Deployment \Version \StorageInterface ;
15
16
16
17
/**
17
18
* Class MergedTest
@@ -43,6 +44,11 @@ class MergedTest extends \PHPUnit\Framework\TestCase
43
44
*/
44
45
private $ assetRepo ;
45
46
47
+ /**
48
+ * @var StorageInterface|\PHPUnit_Framework_MockObject_MockObject
49
+ */
50
+ private $ versionStorage ;
51
+
46
52
protected function setUp ()
47
53
{
48
54
$ this ->assetJsOne = $ this ->getMockForAbstractClass (MergeableInterface::class);
@@ -66,6 +72,7 @@ protected function setUp()
66
72
$ this ->assetRepo = $ this ->getMockBuilder (AssetRepository::class)
67
73
->disableOriginalConstructor ()
68
74
->getMock ();
75
+ $ this ->versionStorage = $ this ->createMock (StorageInterface::class);
69
76
}
70
77
71
78
/**
@@ -74,7 +81,7 @@ protected function setUp()
74
81
*/
75
82
public function testConstructorNothingToMerge ()
76
83
{
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 , []);
78
85
}
79
86
80
87
/**
@@ -89,6 +96,7 @@ public function testConstructorRequireMergeInterface()
89
96
'logger ' => $ this ->logger ,
90
97
'mergeStrategy ' => $ this ->mergeStrategy ,
91
98
'assetRepo ' => $ this ->assetRepo ,
99
+ 'versionStorage ' => $ this ->versionStorage ,
92
100
'assets ' => [$ this ->assetJsOne , $ assetUrl ],
93
101
]);
94
102
}
@@ -108,6 +116,7 @@ public function testConstructorIncompatibleContentTypes()
108
116
'logger ' => $ this ->logger ,
109
117
'mergeStrategy ' => $ this ->mergeStrategy ,
110
118
'assetRepo ' => $ this ->assetRepo ,
119
+ 'versionStorage ' => $ this ->versionStorage ,
111
120
'assets ' => [$ this ->assetJsOne , $ assetCss ],
112
121
]);
113
122
}
@@ -123,6 +132,7 @@ public function testIteratorInterfaceMerge()
123
132
'logger ' => $ this ->logger ,
124
133
'mergeStrategy ' => $ this ->mergeStrategy ,
125
134
'assetRepo ' => $ this ->assetRepo ,
135
+ 'versionStorage ' => $ this ->versionStorage ,
126
136
'assets ' => $ assets ,
127
137
]);
128
138
@@ -157,6 +167,7 @@ public function testIteratorInterfaceMergeFailure()
157
167
'logger ' => $ this ->logger ,
158
168
'mergeStrategy ' => $ this ->mergeStrategy ,
159
169
'assetRepo ' => $ this ->assetRepo ,
170
+ 'versionStorage ' => $ this ->versionStorage ,
160
171
'assets ' => [$ this ->assetJsOne , $ this ->assetJsTwo , $ assetBroken ],
161
172
]);
162
173
0 commit comments