Skip to content

Commit

Permalink
Fix failing test.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Nov 19, 2013
1 parent 39bd1ce commit 02bb1ec
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions Cake/Test/TestCase/ORM/QueryTest.php
Expand Up @@ -1228,21 +1228,17 @@ public function testHydrateBelongsToMany() {
}

$this->assertCount(2, $first->tags);
$articleTag = new \Cake\ORM\Entity(['article_id' => 1, 'tag_id' => 1]);
$articleTag->clean();
$expected = [
'id' => 1,
'name' => 'tag1',
'articles_tags' => $articleTag
'articles_tags' => ['article_id' => 1, 'tag_id' => 1]
];
$this->assertEquals($expected, $first->tags[0]->toArray());

$articleTag = new \Cake\ORM\Entity(['article_id' => 1, 'tag_id' => 2]);
$articleTag->clean();
$expected = [
'id' => 2,
'name' => 'tag2',
'articles_tags' => $articleTag
'articles_tags' => ['article_id' => 1, 'tag_id' => 2]
];
$this->assertEquals($expected, $first->tags[1]->toArray());
}
Expand Down

0 comments on commit 02bb1ec

Please sign in to comment.