Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Adding test case for functions in condition keys.

Closes #1718
  • Loading branch information...
commit 26d80debcd228d829f9de301cb8516c8063a523b 1 parent 26495b3
@markstory markstory authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 cake/tests/cases/libs/model/datasources/dbo_source.test.php
View
4 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);
Please sign in to comment.
Something went wrong with that request. Please try again.