cvs: pear /MDB2/tests MDB2_testcase.php
| From: | Lukas Smith | Date: | Thu, 27 Oct 2005 16:34:45 +0000 |
| Subject: | cvs: pear /MDB2/tests MDB2_testcase.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-35904@lists.php.net to get a copy of this message | ||
lsmith Thu Oct 27 12:34:45 2005 EDT
Modified files:
/pear/MDB2/tests MDB2_testcase.php
Log:
- cosmetic fixes
http://cvs.php.net/diff.php/pear/MDB2/tests/MDB2_testcase.php?r1=1.2&r2=1.3&ty=u
Index: pear/MDB2/tests/MDB2_testcase.php
diff -u pear/MDB2/tests/MDB2_testcase.php:1.2 pear/MDB2/tests/MDB2_testcase.php:1.3
--- pear/MDB2/tests/MDB2_testcase.php:1.2 Tue Oct 18 12:46:05 2005
+++ pear/MDB2/tests/MDB2_testcase.php Thu Oct 27 12:34:43 2005
@@ -41,7 +41,7 @@
// | Author: Paul Cooper <pgc@ucecom.com> |
// +----------------------------------------------------------------------+
//
-// $Id: MDB2_testcase.php,v 1.2 2005/10/18 16:46:05 quipo Exp $
+// $Id: MDB2_testcase.php,v 1.3 2005/10/27 16:34:43 lsmith Exp $
class MDB2_TestCase extends PHPUnit_TestCase {
//contains the dsn of the database we are testing
@@ -141,7 +141,7 @@
function methodExists(&$class, $name) {
if (is_object($class)
- && array_key_exists(strtolower($name),
array_change_key_case(array_flip(get_class_methods($class)), CASE_LOWER))
+ && in_array(strtolower($name), array_map('strtolower',
get_class_methods($class)))
) {
return true;
}
@@ -151,7 +151,7 @@
function tableExists($table) {
$tables = $this->db->manager->listTables();
- return array_key_exists(strtolower($table), array_change_key_case(array_flip($tables),
CASE_LOWER));
+ return in_array(strtolower($table), array_map('strtolower', $tables));
}
}