Adding test case for functions in condition keys.

Closes #1718
This commit is contained in:
mark_story 2011-09-17 16:46:32 -04:00
parent 26495b36d1
commit 26d80debcd

View file

@ -2573,6 +2573,10 @@ class DboSourceTest extends CakeTestCase {
$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);