Skip to content

Commit

Permalink
Fixed some formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
k-halaburda committed Aug 16, 2013
1 parent d7dab32 commit f5daf1c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
12 changes: 6 additions & 6 deletions lib/Cake/Test/Case/Model/ModelReadTest.php
Expand Up @@ -7984,17 +7984,17 @@ public function testRelatedAfterFindCallback() {
'foreignKey' => 'something_id'
)
),
'hasOne'=>array(
'HasOne'=>array(
'hasOne' => array(
'HasOne' => array(
'className' => 'JoinThing',
'foreignKey' => 'something_id'
)
)
)
);

$results = $Something->find('all');

$expected = array(
array(
'Something' => array(
Expand Down Expand Up @@ -8142,13 +8142,13 @@ public function testRelatedAfterFindCallback() {

$JoinThing = new JoinThing();
$JoinThing->unbindModel(array(
'belongsTo'=>array(
'belongsTo' => array(
'Something'
)
)
);
$results = $JoinThing->find('all');

$expected = array(
array(
'JoinThing' => array(
Expand Down
6 changes: 4 additions & 2 deletions lib/Cake/Test/Case/Model/models.php
Expand Up @@ -1511,12 +1511,13 @@ class SomethingElse extends CakeTestModel {
*/
public function afterFind($results, $primary = false) {
foreach ($results as $key => $result) {
if(!empty($result[$this->alias]) && is_array($result[$this->alias])){
if (!empty($result[$this->alias]) && is_array($result[$this->alias])) {
$results[$key][$this->alias]['afterFind'] = 'Successfuly added by AfterFind';
}
}
return $results;
}

}

/**
Expand Down Expand Up @@ -1549,12 +1550,13 @@ class JoinThing extends CakeTestModel {
*/
public function afterFind($results, $primary = false) {
foreach ($results as $key => $result) {
if(!empty($result[$this->alias]) && is_array($result[$this->alias])){
if( !empty($result[$this->alias]) && is_array($result[$this->alias])) {
$results[$key][$this->alias]['afterFind'] = 'Successfuly added by AfterFind';
}
}
return $results;
}

}

/**
Expand Down

0 comments on commit f5daf1c

Please sign in to comment.