mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
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:
parent
bcefc2a14c
commit
4e795bc22c
1 changed files with 4 additions and 0 deletions
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue