Skip to content
Permalink
Browse files

All Marshaller tests finally fixed :)

  • Loading branch information...
lorenzo committed Jul 10, 2014
1 parent 4bf5f10 commit c9f2fe9fd4c1a0ae06bf4a4469a85bfb2efb3417
Showing with 7 additions and 8 deletions.
  1. +1 −1 src/ORM/Table.php
  2. +4 −5 tests/TestCase/ORM/QueryRegressionTest.php
  3. +2 −2 tests/TestCase/ORM/TableTest.php
@@ -1646,7 +1646,7 @@ public function patchEntities($entities, array $data, array $options = []) {
$options['associated'] = $this->_associations->keys();
}
$marshaller = $this->marshaller();
return $marshaller->mergeMany($entities, $data, $associations);
return $marshaller->mergeMany($entities, $data, $options);
}
/**
@@ -226,14 +226,13 @@ public function testBelongsToManyDeepSave($strategy) {
]
]
];
$entity = $articles->patchEntity($entity, $data, [
'Highlights._joinData.Authors', 'Highlights.Authors'
]);
$articles->save($entity, [
$options = [
'associated' => [
'Highlights._joinData.Authors', 'Highlights.Authors'
]
]);
];
$entity = $articles->patchEntity($entity, $data, $options);
$articles->save($entity, $options);
$entity = $articles->get(2, [
'contain' => [
'SpecialTags' => ['sort' => ['SpecialTags.id' => 'ASC']],
@@ -3352,7 +3352,7 @@ public function testPatchEntity() {
$data = ['foo' => 'bar'];
$marshaller->expects($this->once())
->method('merge')
->with($entity, $data, ['users', 'articles'])
->with($entity, $data, ['associated' => ['users', 'articles']])
->will($this->returnValue($entity));
$table->patchEntity($entity, $data);
}
@@ -3375,7 +3375,7 @@ public function testPatchEntities() {
$data = [['foo' => 'bar']];
$marshaller->expects($this->once())
->method('mergeMany')
->with($entities, $data, ['users', 'articles'])
->with($entities, $data, ['associated' => ['users', 'articles']])
->will($this->returnValue($entities));
$table->patchEntities($entities, $data);
}

0 comments on commit c9f2fe9

Please sign in to comment.
You can’t perform that action at this time.