File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -1228,21 +1228,17 @@ public function testHydrateBelongsToMany() {
1228
1228
}
1229
1229
1230
1230
$ this ->assertCount (2 , $ first ->tags );
1231
- $ articleTag = new \Cake \ORM \Entity (['article_id ' => 1 , 'tag_id ' => 1 ]);
1232
- $ articleTag ->clean ();
1233
1231
$ expected = [
1234
1232
'id ' => 1 ,
1235
1233
'name ' => 'tag1 ' ,
1236
- 'articles_tags ' => $ articleTag
1234
+ 'articles_tags ' => [ ' article_id ' => 1 , ' tag_id ' => 1 ]
1237
1235
];
1238
1236
$ this ->assertEquals ($ expected , $ first ->tags [0 ]->toArray ());
1239
1237
1240
- $ articleTag = new \Cake \ORM \Entity (['article_id ' => 1 , 'tag_id ' => 2 ]);
1241
- $ articleTag ->clean ();
1242
1238
$ expected = [
1243
1239
'id ' => 2 ,
1244
1240
'name ' => 'tag2 ' ,
1245
- 'articles_tags ' => $ articleTag
1241
+ 'articles_tags ' => [ ' article_id ' => 1 , ' tag_id ' => 2 ]
1246
1242
];
1247
1243
$ this ->assertEquals ($ expected , $ first ->tags [1 ]->toArray ());
1248
1244
}
You can’t perform that action at this time.
0 commit comments