Permalink
Browse files

Adding test case for functions in condition keys.

Closes #1718
  • Loading branch information...
1 parent 26495b3 commit 26d80debcd228d829f9de301cb8516c8063a523b @markstory markstory committed Sep 17, 2011
Showing with 4 additions and 0 deletions.
  1. +4 −0 cake/tests/cases/libs/model/datasources/dbo_source.test.php
@@ -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);

0 comments on commit 26d80de

Please sign in to comment.