Adding test for incorrect escapeing of numeric fields with value '' in postgresql dbo

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7508 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
Jippi 2008-08-26 16:41:41 +00:00
parent 65df6ca0d8
commit fc012dc32f

View file

@ -278,8 +278,10 @@ class DboPostgresTest extends CakeTestCase {
*/
function testValueQuoting() {
$this->assertEqual($this->db2->value('0', 'integer'), "'0'");
$this->assertEqual($this->db2->value('', 'integer'), "DEFAULT");
$this->assertEqual($this->db2->value('', 'float'), "DEFAULT");
$this->assertEqual($this->db2->value('', 'integer'), 'NULL');
$this->assertEqual($this->db2->value('', 'float'), 'NULL');
$this->assertEqual($this->db2->value('', 'integer', false), "DEFAULT");
$this->assertEqual($this->db2->value('', 'float', false), "DEFAULT");
$this->assertEqual($this->db2->value('0.0', 'float'), "'0.0'");
$this->assertEqual($this->db2->value('t', 'boolean'), "TRUE");