cvs: pear /MDB2/tests MDB2_testcase.php
| From: | Lorenzo Alberton | Date: | Tue, 18 Oct 2005 16:46:06 +0000 |
| Subject: | cvs: pear /MDB2/tests MDB2_testcase.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-35673@lists.php.net to get a copy of this message | ||
quipo Tue Oct 18 12:46:06 2005 EDT
Modified files:
/pear/MDB2/tests MDB2_testcase.php
Log:
case insensitive check in tableExists()
http://cvs.php.net/diff.php/pear/MDB2/tests/MDB2_testcase.php?r1=1.1&r2=1.2&ty=u
Index: pear/MDB2/tests/MDB2_testcase.php
diff -u pear/MDB2/tests/MDB2_testcase.php:1.1 pear/MDB2/tests/MDB2_testcase.php:1.2
--- pear/MDB2/tests/MDB2_testcase.php:1.1 Mon Oct 17 04:07:32 2005
+++ pear/MDB2/tests/MDB2_testcase.php Tue Oct 18 12:46:05 2005
@@ -41,7 +41,7 @@
// | Author: Paul Cooper <pgc@ucecom.com> |
// +----------------------------------------------------------------------+
//
-// $Id: MDB2_testcase.php,v 1.1 2005/10/17 08:07:32 lsmith Exp $
+// $Id: MDB2_testcase.php,v 1.2 2005/10/18 16:46:05 quipo Exp $
class MDB2_TestCase extends PHPUnit_TestCase {
//contains the dsn of the database we are testing
@@ -151,7 +151,7 @@
function tableExists($table) {
$tables = $this->db->manager->listTables();
- return in_array($table, $tables);
+ return array_key_exists(strtolower($table), array_change_key_case(array_flip($tables),
CASE_LOWER));
}
}