Skip to content

Commit

Permalink
Adding test case for functions in condition keys.
Browse files Browse the repository at this point in the history
Closes #1718
  • Loading branch information
markstory committed Sep 17, 2011
1 parent 26495b3 commit 26d80de
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cake/tests/cases/libs/model/datasources/dbo_source.test.php
Expand Up @@ -2573,6 +2573,10 @@ function testArrayConditionsParsing() {
$expected = " WHERE MAX(`Post`.`rating`) > '50'";
$this->assertEqual($result, $expected);

$result = $this->testDb->conditions(array('lower(Article.title)' => 'secrets'));
$expected = " WHERE lower(`Article`.`title`) = 'secrets'";
$this->assertEqual($result, $expected);

$result = $this->testDb->conditions(array('title LIKE' => '%hello'));
$expected = " WHERE `title` LIKE '%hello'";
$this->assertEqual($result, $expected);
Expand Down

0 comments on commit 26d80de

Please sign in to comment.