[prev in list] [next in list] [prev in thread] [next in thread]
List: pear-cvs
Subject: [PEAR-CVS] cvs: pear /MDB/tests MDB_usage_testcase.php
From: "Lukas Smith" <smith () dybnet ! de>
Date: 2003-03-09 0:54:34
[Download RAW message or body]
lsmith Sat Mar 8 19:54:34 2003 EDT
Modified files:
/pear/MDB/tests MDB_usage_testcase.php
Log:
improved testnulls testcase to reflect the recent changes in getTextValue
Index: pear/MDB/tests/MDB_usage_testcase.php
diff -u pear/MDB/tests/MDB_usage_testcase.php:1.24 \
pear/MDB/tests/MDB_usage_testcase.php:1.25
--- pear/MDB/tests/MDB_usage_testcase.php:1.24 Sun Feb 2 08:38:45 2003
+++ pear/MDB/tests/MDB_usage_testcase.php Sat Mar 8 19:54:34 2003
@@ -41,7 +41,7 @@
// | Author: Paul Cooper <pgc@ucecom.com> |
// +----------------------------------------------------------------------+
//
-// $Id: MDB_usage_testcase.php,v 1.24 2003/02/02 13:38:45 lsmith Exp $
+// $Id: MDB_usage_testcase.php,v 1.25 2003/03/09 00:54:34 lsmith Exp $
class MDB_Usage_TestCase extends PHPUnit_TestCase {
//contains the dsn of the database we are testing
@@ -337,10 +337,11 @@
*/
function testNulls() {
$test_values = array(
- 'test',
- 'NULL',
- 'null',
- ''
+ array('test', FALSE),
+ array('NULL', FALSE),
+ array('null', FALSE),
+ array('', FALSE),
+ array(NULL, TRUE)
);
for ($test_value = 0; $test_value <= count($test_values); $test_value++) {
@@ -348,8 +349,8 @@
$value = 'NULL';
$is_null = TRUE;
} else {
- $value = $this->db->getTextValue($test_values[$test_value]);
- $is_null = FALSE;
+ $value = $this->db->getTextValue($test_values[$test_value][0]);
+ $is_null = $test_values[$test_value][1];
}
$this->clearTables();
@@ -371,7 +372,7 @@
if ($is_null) {
$error_message = 'A query result column is not NULL unlike what was \
expected'; } else {
- $error_message = "A query result column is NULL even though it was \
expected to be \"".$test_values[$test_value]."\""; + $error_message = \
"A query result column is NULL even though it was expected to be \
\"".$test_values[$test_value][0]."\""; }
$this->assertTrue(($this->db->resultIsNull($result, 0, 0) == $is_null), \
$error_message);
--
PEAR CVS Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic