Adding test case for DboSource::conditions() (Ticket #3373)

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5773 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
nate 2007-10-17 06:13:37 +00:00
parent bcefc2a14c
commit 4e795bc22c

View file

@ -1628,6 +1628,10 @@ class DboSourceTest extends UnitTestCase {
$result = $this->db->conditions($conditions);
$expected = " WHERE NOT ((`Listing`.`expiration` BETWEEN '1' AND '100')) AND ((`Listing`.`title` LIKE '%term%') OR (`Listing`.`description` LIKE '%term%')) AND ((`Listing`.`title` LIKE '%term_2%') OR (`Listing`.`description` LIKE '%term_2%'))";
$this->assertEqual($result, $expected);
$result = $this->db->conditions(array('MD5(CONCAT(Reg.email,Reg.id))' => 'blah'));
$expected = " WHERE MD5(CONCAT(`Reg`.`email`,`Reg`.`id`)) = 'blah'";
$this->assertEqual($result, $expected);
}
function testMixedConditionsParsing() {