From fc012dc32feb5891b3c01804eec882256bd2d739 Mon Sep 17 00:00:00 2001 From: Jippi Date: Tue, 26 Aug 2008 16:41:41 +0000 Subject: [PATCH] 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 --- .../cases/libs/model/datasources/dbo/dbo_postgres.test.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cake/tests/cases/libs/model/datasources/dbo/dbo_postgres.test.php b/cake/tests/cases/libs/model/datasources/dbo/dbo_postgres.test.php index 3299f2f0f..ba2ba3eaf 100644 --- a/cake/tests/cases/libs/model/datasources/dbo/dbo_postgres.test.php +++ b/cake/tests/cases/libs/model/datasources/dbo/dbo_postgres.test.php @@ -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");