File tree Expand file tree Collapse file tree 1 file changed +22
-8
lines changed
app/code/Magento/Downloadable/Test/Unit/Model/Link Expand file tree Collapse file tree 1 file changed +22
-8
lines changed Original file line number Diff line number Diff line change @@ -94,10 +94,17 @@ public function testBuild($data, $expectedPrice)
94
94
$ basePath = 'l/e/f/gm ' ;
95
95
$ baseSamplePath = 's/l/e/f/gm ' ;
96
96
$ linkFileName = 'cat1.png ' ;
97
- $ this ->objectCopyServiceMock ->expects ($ this ->once ())->method ('getDataFromFieldset ' )->with (
98
- 'downloadable_data ' ,
99
- 'to_link ' ,
100
- $ data
97
+ $ this ->objectCopyServiceMock ->expects ($ this ->exactly (2 ))->method ('getDataFromFieldset ' )->withConsecutive (
98
+ [
99
+ 'downloadable_data ' ,
100
+ 'to_link ' ,
101
+ $ data
102
+ ],
103
+ [
104
+ 'downloadable_link_sample_data ' ,
105
+ 'to_link_sample ' ,
106
+ $ data ['sample ' ]
107
+ ]
101
108
)->willReturn ($ downloadableData );
102
109
$ this ->service ->setData ($ data );
103
110
$ this ->dataObjectHelperMock ->method ('populateWithArray ' )
@@ -165,10 +172,17 @@ public function testBuildFileNotProvided()
165
172
]
166
173
];
167
174
$ downloadableData = ['sort_order ' => 1 ];
168
- $ this ->objectCopyServiceMock ->expects ($ this ->once ())->method ('getDataFromFieldset ' )->with (
169
- 'downloadable_data ' ,
170
- 'to_link ' ,
171
- $ data
175
+ $ this ->objectCopyServiceMock ->expects ($ this ->exactly (2 ))->method ('getDataFromFieldset ' )->withConsecutive (
176
+ [
177
+ 'downloadable_data ' ,
178
+ 'to_link ' ,
179
+ $ data
180
+ ],
181
+ [
182
+ 'downloadable_link_sample_data ' ,
183
+ 'to_link_sample ' ,
184
+ $ data ['sample ' ]
185
+ ]
172
186
)->willReturn ($ downloadableData );
173
187
$ this ->service ->setData ($ data );
174
188
$ this ->dataObjectHelperMock ->method ('populateWithArray ' )
You can’t perform that action at this time.
0 commit comments