@@ -127,6 +127,57 @@ public function testRestoreDeletedAssetSpecificVersion($publicIds, $options, $ur
127127 self ::assertRequestJsonBodySubset ($ lastRequest , $ bodyFields );
128128 }
129129
130+ /**
131+ * @return array[]
132+ */
133+ public function restoreDeletedAssetByAssetIDSpecificVersionDataProvider ()
134+ {
135+ return [
136+ [
137+ 'assetIds ' => self ::API_TEST_ASSET_ID ,
138+ 'options ' => [
139+ 'versions ' => ['293272f6bd9ec6ae9fa643e295b4dd1b ' ],
140+ ],
141+ 'url ' => '/resources/restore ' ,
142+ 'bodyFields ' => [
143+ 'asset_ids ' => [self ::API_TEST_ASSET_ID ],
144+ 'versions ' => ['293272f6bd9ec6ae9fa643e295b4dd1b ' ],
145+ ],
146+ ],
147+ [
148+ 'assetIds ' => [self ::API_TEST_ASSET_ID2 , self ::API_TEST_ASSET_ID3 ],
149+ 'options ' => [
150+ 'versions ' => ['9fa643e295b4dd1b293272f6bd9ec6ae ' , 'b4dd1b293272f6bd9fa643e2959ec6ae ' ],
151+ ],
152+ 'url ' => '/resources/restore ' ,
153+ 'bodyFields ' => [
154+ 'asset_ids ' => [self ::API_TEST_ASSET_ID2 , self ::API_TEST_ASSET_ID3 ],
155+ 'versions ' => ['9fa643e295b4dd1b293272f6bd9ec6ae ' , 'b4dd1b293272f6bd9fa643e2959ec6ae ' ],
156+ ],
157+ ],
158+ ];
159+ }
160+
161+ /**
162+ * Restore specific versions of a deleted asset by asset IDs.
163+ *
164+ * @dataProvider restoreDeletedAssetByAssetIDSpecificVersionDataProvider
165+ *
166+ * @param array|string $assetIds
167+ * @param array $options
168+ * @param string $url
169+ * @param array $bodyFields
170+ */
171+ public function testRestoreDeletedAssetByAssetIDSpecificVersion ($ assetIds , $ options , $ url , $ bodyFields )
172+ {
173+ $ mockAdminApi = new MockAdminApi ();
174+ $ mockAdminApi ->restoreByAssetIds ($ assetIds , $ options );
175+ $ lastRequest = $ mockAdminApi ->getMockHandler ()->getLastRequest ();
176+
177+ self ::assertRequestUrl ($ lastRequest , $ url );
178+ self ::assertRequestJsonBodySubset ($ lastRequest , $ bodyFields );
179+ }
180+
130181 /**
131182 * Test update assets complex fields serialization.
132183 */
0 commit comments