@@ -290,13 +290,12 @@ public function middleware(): array
290
290
291
291
$ actionJob = new ActionJob ($ action , [$ user ]);
292
292
293
- // simulate action job is push to the queue
293
+ // simulate action job is pushed to the queue
294
294
$ serialized = serialize ($ actionJob );
295
295
296
- // simulate action job is handled by a queue worker
296
+ // deserialize to assert which properties were loaded
297
297
$ unSerialized = unserialize ($ serialized );
298
298
299
- // the model should be deserialized by pulling the latest instance from the database
300
299
$ unSerializedModel = $ unSerialized ->parameters ()[0 ];
301
300
302
301
expect ($ unSerializedModel )->toBeInstanceOf (ModelSerializationUser::class)
@@ -324,19 +323,18 @@ function (
324
323
325
324
$ action = app ($ actionClass );
326
325
327
- // make sure relation was loaded before passing to action
326
+ // make sure relations were loaded before passing to action
328
327
$ user ->load ('children ' );
329
328
$ child ->load ('children ' );
330
329
331
330
$ actionJob = new ActionJob ($ action , [collect ([$ user , $ child ])]);
332
331
333
- // simulate action job is push to the queue
332
+ // simulate action job is pushed to the queue
334
333
$ serialized = serialize ($ actionJob );
335
334
336
- // simulate action job is handled by a queue worker
335
+ // deserialize to assert which properties were loaded
337
336
$ unSerialized = unserialize ($ serialized );
338
337
339
- // the model should be deserialized by pulling the latest instance from the database
340
338
$ unSerializedModelCollection = $ unSerialized ->parameters ()[0 ];
341
339
342
340
expect ($ unSerializedModelCollection )->toBeInstanceOf (Collection::class)
0 commit comments