Skip to content

Commit

Permalink
Fixing some failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Mar 16, 2014
1 parent b83bea9 commit ecfc301
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion tests/TestCase/ORM/ResultSetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,11 @@ public function testIteratorAfterSerializationHydrated() {
// Use a loop to test Iterator implementation
foreach ($results as $i => $row) {
$expected = new \Cake\ORM\Entity($this->fixtureData[$i]);
$expected->isNew(false);
$expected->source([
'alias' => $this->table->alias(),
'className' => get_class($this->table)
]);
$expected->clean();
$this->assertEquals($expected, $row, "Row $i does not match");
}
Expand Down Expand Up @@ -217,7 +222,14 @@ public function testCountAfterSerialize() {
public function testGroupBy() {
$query = $this->table->find('all');
$results = $query->all()->groupBy('author_id')->toArray();
$options = ['markNew' => false, 'markClean' => true];
$options = [
'markNew' => false,
'markClean' => true,
'source' => [
'alias' => $this->table->alias(),
'className' => get_class($this->table)
]
];
$expected = [
1 => [
new Entity($this->fixtureData[0], $options),
Expand Down

0 comments on commit ecfc301

Please sign in to comment.