File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -511,7 +511,9 @@ public function itCanGetAllRelationships()
511
511
$ masterItem = new MasterItem ();
512
512
$ childItem = new ChildItem ();
513
513
$ childItem ->setId ('1 ' );
514
+ $ childItem ->setMeta (new Meta (['foo ' => 'bar ' ]));
514
515
$ masterItem ->child ()->associate ($ childItem );
516
+ $ masterItem ->children ()->associate (new Collection ([$ childItem ]));
515
517
516
518
$ relations = $ masterItem ->getRelationships ();
517
519
@@ -520,6 +522,20 @@ public function itCanGetAllRelationships()
520
522
'data ' => [
521
523
'type ' => 'child ' ,
522
524
'id ' => '1 ' ,
525
+ 'meta ' => [
526
+ 'foo ' => 'bar ' ,
527
+ ],
528
+ ],
529
+ ],
530
+ 'children ' => [
531
+ 'data ' => [
532
+ [
533
+ 'type ' => 'child ' ,
534
+ 'id ' => '1 ' ,
535
+ 'meta ' => [
536
+ 'foo ' => 'bar ' ,
537
+ ],
538
+ ],
523
539
],
524
540
],
525
541
], $ relations );
You can’t perform that action at this time.
0 commit comments