Skip to content

Commit 02bb1ec

Browse files
committed
Fix failing test.
1 parent 39bd1ce commit 02bb1ec

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

Cake/Test/TestCase/ORM/QueryTest.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1228,21 +1228,17 @@ public function testHydrateBelongsToMany() {
12281228
}
12291229

12301230
$this->assertCount(2, $first->tags);
1231-
$articleTag = new \Cake\ORM\Entity(['article_id' => 1, 'tag_id' => 1]);
1232-
$articleTag->clean();
12331231
$expected = [
12341232
'id' => 1,
12351233
'name' => 'tag1',
1236-
'articles_tags' => $articleTag
1234+
'articles_tags' => ['article_id' => 1, 'tag_id' => 1]
12371235
];
12381236
$this->assertEquals($expected, $first->tags[0]->toArray());
12391237

1240-
$articleTag = new \Cake\ORM\Entity(['article_id' => 1, 'tag_id' => 2]);
1241-
$articleTag->clean();
12421238
$expected = [
12431239
'id' => 2,
12441240
'name' => 'tag2',
1245-
'articles_tags' => $articleTag
1241+
'articles_tags' => ['article_id' => 1, 'tag_id' => 2]
12461242
];
12471243
$this->assertEquals($expected, $first->tags[1]->toArray());
12481244
}

0 commit comments

Comments
 (0)