cvs: pear /MDB2/tests MDB2_datatype_testcase.php

From: Date: Mon, 05 Mar 2007 01:34:27 +0000
Subject: cvs: pear /MDB2/tests MDB2_datatype_testcase.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-44973@lists.php.net to get a copy of this message
quipo Mon Mar 5 01:34:27 2007 UTC Modified files: /pear/MDB2/tests MDB2_datatype_testcase.php Log: special cases for sqlite http://cvs.php.net/viewvc.cgi/pear/MDB2/tests/MDB2_datatype_testcase.php?r1=1.14&r2=1.15&diff_format=u Index: pear/MDB2/tests/MDB2_datatype_testcase.php diff -u pear/MDB2/tests/MDB2_datatype_testcase.php:1.14 pear/MDB2/tests/MDB2_datatype_testcase.php:1.15 --- pear/MDB2/tests/MDB2_datatype_testcase.php:1.14 Fri Mar 2 19:41:00 2007 +++ pear/MDB2/tests/MDB2_datatype_testcase.php Mon Mar 5 01:34:27 2007 @@ -41,7 +41,7 @@ // | Author: Lorenzo Alberton <l dot alberton at quipo dot it> | // +----------------------------------------------------------------------+ // -// $Id: MDB2_datatype_testcase.php,v 1.14 2007/03/02 19:41:00 quipo Exp $ +// $Id: MDB2_datatype_testcase.php,v 1.15 2007/03/05 01:34:27 quipo Exp $ require_once 'MDB2_testcase.php'; @@ -682,7 +682,8 @@ $type = 'integer'; $field = array('type' => 'integer'); $result = $this->db->datatype->getDeclaration($type, $name, $field); - $this->assertEquals('column INT DEFAULT NULL', $result, 'getDeclaration'); + $actual_type = $this->db->phptype == 'sqlite' ? 'INTEGER' : 'INT'; + $this->assertEquals('column '.$actual_type.' DEFAULT NULL', $result, 'getDeclaration'); // Test with a custom datatype $this->db->setOption('datatype_map', array('test' => 'test')); @@ -758,7 +759,7 @@ $field['type'] = 'integer'; } $expected_length = 8; - if (in_array($this->db->phptype, array('mysql', 'mysqli', 'pgsql'))) { + if (in_array($this->db->phptype, array('mysql', 'mysqli', 'pgsql', 'sqlite'))) { $expected_length = 4; } $result = $this->db->datatype->mapNativeDatatype($field);

« previous php.pear.cvs (#44973) next »