Skip to content
Permalink
Browse files

Fixed failing test case

  • Loading branch information...
lorenzo committed May 20, 2012
1 parent b22c50d commit dc8c731ccbecda51c4d332d50eda1ade084cd2ef
Showing with 7 additions and 1 deletion.
  1. +5 −0 lib/Cake/Model/ModelValidator.php
  2. +2 −1 lib/Cake/Test/Case/Model/ModelValidationTest.php
@@ -123,6 +123,11 @@ public function validateAssociated(&$data, $options = array()) {
$return[$model->alias] = true;
}
$data = $model->data;
if (!empty($options['deep']) && isset($data[$model->alias])) {
$recordData = $data[$model->alias];
unset($data[$model->alias]);
$data = array_merge($data, $recordData);
}
$associations = $model->getAssociated();
foreach ($data as $association => &$values) {
@@ -1564,7 +1564,8 @@ public function testValidateAssociated() {
'comment' =>
'comment',
'published' => 'Y',
'user_id' => 1),
'user_id' => 1
),
array(
'id' => 3,
'comment' => '',

0 comments on commit dc8c731

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