cvs: pear /MDB/tests MDB_usage_testcase.php

From: Date: Tue, 23 Sep 2003 12:53:45 +0000
Subject: cvs: pear /MDB/tests MDB_usage_testcase.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-13012@lists.php.net to get a copy of this message
lsmith Tue Sep 23 08:53:45 2003 EDT Modified files: /pear/MDB/tests MDB_usage_testcase.php Log: fixes to resultIsNull test Index: pear/MDB/tests/MDB_usage_testcase.php diff -u pear/MDB/tests/MDB_usage_testcase.php:1.47 pear/MDB/tests/MDB_usage_testcase.php:1.48 --- pear/MDB/tests/MDB_usage_testcase.php:1.47 Mon Sep 22 07:12:12 2003 +++ pear/MDB/tests/MDB_usage_testcase.php Tue Sep 23 08:53:45 2003 @@ -41,7 +41,7 @@ // | Author: Paul Cooper <pgc@ucecom.com> | // +----------------------------------------------------------------------+ // -// $Id: MDB_usage_testcase.php,v 1.47 2003/09/22 11:12:12 lsmith Exp $ +// $Id: MDB_usage_testcase.php,v 1.48 2003/09/23 12:53:45 lsmith Exp $ class MDB_Usage_TestCase extends PHPUnit_TestCase { //contains the dsn of the database we are testing @@ -341,7 +341,7 @@ function testNulls() { $test_values = array( array('test', false), - array('null', false), + array('NULL', false), array('null', false), array('', false), array(null, true) @@ -378,9 +378,11 @@ $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); + $value = $this->db->resultIsNull($result, 0, 0); + $this->assertTrue(($value == $is_null), $error_message); - $this->assertTrue(($this->db->resultIsNull($result, 0, 1) == $is_null), $error_message); + $value = $this->db->resultIsNull($result, 0, 1); + $this->assertTrue(($value == $is_null), $error_message); $this->assertTrue($this->db->endOfResult($result), 'the query result did not seem to have reached the end of result as expected after testing only if columns are NULLs');

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