@@ -102,6 +102,71 @@ public function testConstructor(
102102 );
103103 }
104104
105+ public static function constructorPropsProvider (): iterable
106+ {
107+ return [
108+ [
109+ 'test search ' ,
110+ [],
111+ [],
112+ [],
113+ [],
114+ [],
115+ [],
116+ [],
117+ 25 ,
118+ null ,
119+ ['created_at ' => 'desc ' ],
120+ 'test search|25|||||||||created_at=desc ' ,
121+ ],
122+ [
123+ null ,
124+ ['audio ' , 'video ' ],
125+ ['root/images ' , 'root/videos ' ],
126+ ['public ' , 'private ' ],
127+ ['tag1 ' , 'tag2 ' , 'tag3 ' ],
128+ [],
129+ ['hash1 ' , 'hash2 ' , 'hash3 ' ],
130+ [
131+ 'type ' => ['product_image ' , 'product_category ' ],
132+ 'source ' => 'webshop ' ,
133+ ],
134+ 30 ,
135+ null ,
136+ ['updated_at ' => 'asc ' ],
137+ '|30||audio,video|root/images,root/videos|public,private|tag1,tag2,tag3||hash1,hash2,hash3|type=product_image,type=product_category,source=webshop|updated_at=asc ' ,
138+ ],
139+ [
140+ null ,
141+ [],
142+ [],
143+ [],
144+ [],
145+ ['root/images/image1.jpg ' , 'root/videos/example.mp4 ' ],
146+ [],
147+ [],
148+ 25 ,
149+ null ,
150+ ['created_at ' => 'desc ' ],
151+ '|25||||||root/images/image1.jpg,root/videos/example.mp4|||created_at=desc ' ,
152+ ],
153+ [
154+ 'unix ' ,
155+ ['image ' ],
156+ ['root/images ' ],
157+ ['protected ' ],
158+ ['tech ' ],
159+ [],
160+ [],
161+ [],
162+ 25 ,
163+ 'd395jdgew45nd73kjsijfh ' ,
164+ ['created_at ' => 'asc ' ],
165+ 'unix|25|d395jdgew45nd73kjsijfh|image|root/images|protected|tech||||created_at=asc ' ,
166+ ],
167+ ];
168+ }
169+
105170 #[DataProvider('remoteIdsProvider ' )]
106171 public function testFromRemoteIds (
107172 array $ remoteIds ,
@@ -150,6 +215,26 @@ public function testFromRemoteIds(
150215 );
151216 }
152217
218+ public static function remoteIdsProvider (): iterable
219+ {
220+ return [
221+ [
222+ ['image.jpg ' , 'test/subfolder/document.pdf ' , 'videos/example.mp4 ' , 'media/audio/song.mp3 ' ],
223+ 100 ,
224+ null ,
225+ ['created_at ' => 'asc ' ],
226+ '|100||||||image.jpg,test/subfolder/document.pdf,videos/example.mp4,media/audio/song.mp3|||created_at=asc ' ,
227+ ],
228+ [
229+ ['image.jpg ' ],
230+ 25 ,
231+ 'ewdsofu439oirejfoi3 ' ,
232+ ['updated_at ' => 'desc ' ],
233+ '|25|ewdsofu439oirejfoi3|||||image.jpg|||updated_at=desc ' ,
234+ ],
235+ ];
236+ }
237+
153238 public function testSimpleFromRemoteIds (): void
154239 {
155240 $ query = Query::fromRemoteIds (['test/image.jpg ' ]);
@@ -198,89 +283,4 @@ public function testSettingNextCursor(): void
198283 $ query ->getNextCursor (),
199284 );
200285 }
201-
202- public static function constructorPropsProvider (): array
203- {
204- return [
205- [
206- 'test search ' ,
207- [],
208- [],
209- [],
210- [],
211- [],
212- [],
213- [],
214- 25 ,
215- null ,
216- ['created_at ' => 'desc ' ],
217- 'test search|25|||||||||created_at=desc ' ,
218- ],
219- [
220- null ,
221- ['audio ' , 'video ' ],
222- ['root/images ' , 'root/videos ' ],
223- ['public ' , 'private ' ],
224- ['tag1 ' , 'tag2 ' , 'tag3 ' ],
225- [],
226- ['hash1 ' , 'hash2 ' , 'hash3 ' ],
227- [
228- 'type ' => ['product_image ' , 'product_category ' ],
229- 'source ' => 'webshop ' ,
230- ],
231- 30 ,
232- null ,
233- ['updated_at ' => 'asc ' ],
234- '|30||audio,video|root/images,root/videos|public,private|tag1,tag2,tag3||hash1,hash2,hash3|type=product_image,type=product_category,source=webshop|updated_at=asc ' ,
235- ],
236- [
237- null ,
238- [],
239- [],
240- [],
241- [],
242- ['root/images/image1.jpg ' , 'root/videos/example.mp4 ' ],
243- [],
244- [],
245- 25 ,
246- null ,
247- ['created_at ' => 'desc ' ],
248- '|25||||||root/images/image1.jpg,root/videos/example.mp4|||created_at=desc ' ,
249- ],
250- [
251- 'unix ' ,
252- ['image ' ],
253- ['root/images ' ],
254- ['protected ' ],
255- ['tech ' ],
256- [],
257- [],
258- [],
259- 25 ,
260- 'd395jdgew45nd73kjsijfh ' ,
261- ['created_at ' => 'asc ' ],
262- 'unix|25|d395jdgew45nd73kjsijfh|image|root/images|protected|tech||||created_at=asc ' ,
263- ],
264- ];
265- }
266-
267- public static function remoteIdsProvider (): array
268- {
269- return [
270- [
271- ['image.jpg ' , 'test/subfolder/document.pdf ' , 'videos/example.mp4 ' , 'media/audio/song.mp3 ' ],
272- 100 ,
273- null ,
274- ['created_at ' => 'asc ' ],
275- '|100||||||image.jpg,test/subfolder/document.pdf,videos/example.mp4,media/audio/song.mp3|||created_at=asc ' ,
276- ],
277- [
278- ['image.jpg ' ],
279- 25 ,
280- 'ewdsofu439oirejfoi3 ' ,
281- ['updated_at ' => 'desc ' ],
282- '|25|ewdsofu439oirejfoi3|||||image.jpg|||updated_at=desc ' ,
283- ],
284- ];
285- }
286286}
0 commit comments