@@ -312,7 +312,11 @@ public function testHasManyEagerLoading($strategy) {
312
312
$ query = new Query ($ this ->connection );
313
313
$ table = Table::build ('author ' , ['connection ' => $ this ->connection ]);
314
314
Table::build ('article ' , ['connection ' => $ this ->connection ]);
315
- $ table ->hasMany ('article ' , ['property ' => 'articles ' , 'strategy ' => $ strategy ]);
315
+ $ table ->hasMany ('article ' , [
316
+ 'property ' => 'articles ' ,
317
+ 'strategy ' => $ strategy ,
318
+ 'sort ' => ['article.id ' => 'asc ' ]
319
+ ]);
316
320
317
321
$ results = $ query ->repository ($ table )->select ()->contain ('article ' )->toArray ();
318
322
$ expected = [
@@ -432,7 +436,11 @@ public function testHasManyEagerLoadingDeep($strategy) {
432
436
$ query = new Query ($ this ->connection );
433
437
$ table = Table::build ('author ' , ['connection ' => $ this ->connection ]);
434
438
$ article = Table::build ('article ' , ['connection ' => $ this ->connection ]);
435
- $ table ->hasMany ('article ' , ['property ' => 'articles ' ] + compact ('strategy ' ));
439
+ $ table ->hasMany ('article ' , [
440
+ 'property ' => 'articles ' ,
441
+ 'stratgey ' => $ strategy ,
442
+ 'sort ' => ['article.id ' => 'asc ' ]
443
+ ]);
436
444
$ article ->belongsTo ('author ' );
437
445
438
446
$ results = $ query ->repository ($ table )
0 commit comments