Skip to content

Commit

Permalink
Fixing code formatting in test cases.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed May 30, 2010
1 parent 07948a7 commit 66a8890
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Expand Up @@ -4316,7 +4316,7 @@ function testVirtualFieldsInConditions() {
' WHERE Article.id = ' . $this->db->fullTableName('comments') . '.article_id'
);
$conditions = array('two' => 2);
$result = $this->db->conditions($conditions,true,false,$Article);
$result = $this->db->conditions($conditions, true, false, $Article);
$expected = '(1 + 1) = 2';
$this->assertEqual($expected, $result);

Expand Down
4 changes: 2 additions & 2 deletions cake/tests/cases/libs/model/model_read.test.php
Expand Up @@ -7223,15 +7223,15 @@ function testVirtualFields() {

$dbo =& $Post->getDataSource();
$Post->virtualFields = array('other_field' => 'Post.id + 1');
$result = $Post->find('first',array(
$result = $Post->find('first', array(
'conditions' => array('other_field' => 3),
'limit' => 1
));
$this->assertEqual($result['Post']['id'], 2);

$Post->virtualFields = array('other_field' => 'Post.id + 1');
$result = $Post->find('all',array(
'fields' => array($dbo->calculate($Post, 'max',array('other_field')))
'fields' => array($dbo->calculate($Post, 'max', array('other_field')))
));
$this->assertEqual($result[0][0]['other_field'], 4);

Expand Down

0 comments on commit 66a8890

Please sign in to comment.