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:
nate 2007-08-04 17:26:23 +00:00
parent 1a690c48a4
commit a03b688062

View file

@ -1393,6 +1393,14 @@ class DboSourceTest extends UnitTestCase {
$result = $this->db->conditions('DATEDIFF(NOW(),Article.published) < 1 && Article.live=1');
$expected = " WHERE DATEDIFF(NOW(),`Article`.`published`) < 1 && `Article`.`live`=1";
$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() {