From 26d80debcd228d829f9de301cb8516c8063a523b Mon Sep 17 00:00:00 2001 From: mark_story Date: Sat, 17 Sep 2011 16:46:32 -0400 Subject: [PATCH] Adding test case for functions in condition keys. Closes #1718 --- cake/tests/cases/libs/model/datasources/dbo_source.test.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cake/tests/cases/libs/model/datasources/dbo_source.test.php b/cake/tests/cases/libs/model/datasources/dbo_source.test.php index 3b7137ecf..f092f2dd8 100644 --- a/cake/tests/cases/libs/model/datasources/dbo_source.test.php +++ b/cake/tests/cases/libs/model/datasources/dbo_source.test.php @@ -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);