mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-02-07 12:36:25 +00:00
Adding DboSource quoting test cases for Ticket #2922
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5489 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
1a690c48a4
commit
a03b688062
1 changed files with 8 additions and 0 deletions
|
@ -1393,6 +1393,14 @@ class DboSourceTest extends UnitTestCase {
|
||||||
$result = $this->db->conditions('DATEDIFF(NOW(),Article.published) < 1 && Article.live=1');
|
$result = $this->db->conditions('DATEDIFF(NOW(),Article.published) < 1 && Article.live=1');
|
||||||
$expected = " WHERE DATEDIFF(NOW(),`Article`.`published`) < 1 && `Article`.`live`=1";
|
$expected = " WHERE DATEDIFF(NOW(),`Article`.`published`) < 1 && `Article`.`live`=1";
|
||||||
$this->assertEqual($result, $expected);
|
$this->assertEqual($result, $expected);
|
||||||
|
|
||||||
|
$result = $this->db->conditions('file = "index.html"');
|
||||||
|
$expected = ' WHERE file = "index.html"';
|
||||||
|
$this->assertEqual($result, $expected);
|
||||||
|
|
||||||
|
$result = $this->db->conditions("file = 'index.html'");
|
||||||
|
$expected = " WHERE file = 'index.html'";
|
||||||
|
$this->assertEqual($result, $expected);
|
||||||
}
|
}
|
||||||
|
|
||||||
function testQuotesInStringConditions() {
|
function testQuotesInStringConditions() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue