Skip to content

Commit

Permalink
More whitespace fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Dec 19, 2009
1 parent ab21855 commit 18c878b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cake/tests/cases/libs/model/datasources/dbo_source.test.php
Expand Up @@ -4206,22 +4206,22 @@ function testVirtualFieldsInCalculate() {
* @return void
*/
function testVirtualFieldsFetch() {
$this->loadFixtures('Article','Comment');
$this->loadFixtures('Article', 'Comment');

$Article =& ClassRegistry::init('Article');
$Article->virtualFields = array(
'comment_count' => 'SELECT COUNT(*) FROM ' . $this->db->fullTableName('comments') .
' WHERE Article.id = ' . $this->db->fullTableName('comments'). '.article_id'
' WHERE Article.id = ' . $this->db->fullTableName('comments') . '.article_id'
);

$conditions = array('comment_count >' => 2);
$query = 'SELECT ' . join(',',$this->db->fields($Article,null,array('id','comment_count'))) .
' FROM ' . $this->db->fullTableName($Article) . ' Article ' . $this->db->conditions($conditions,true,true,$Article);
$query = 'SELECT ' . join(',',$this->db->fields($Article, null, array('id', 'comment_count'))) .
' FROM ' . $this->db->fullTableName($Article) . ' Article ' . $this->db->conditions($conditions, true, true, $Article);
$result = $this->db->fetchAll($query);
$expected = array(array(
'Article' => array('id' => 1, 'comment_count' => 4)
));
$this->assertEqual($expected,$result);
$this->assertEqual($expected, $result);
}
}
?>

0 comments on commit 18c878b

Please sign in to comment.