cvs: pear(MDB_1) /MDB/tests MDB_bugs_testcase.php
| From: | Lukas Smith | Date: | Fri, 12 Mar 2004 14:16:09 +0000 |
| Subject: | cvs: pear(MDB_1) /MDB/tests MDB_bugs_testcase.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-17337@lists.php.net to get a copy of this message | ||
lsmith Fri Mar 12 09:16:09 2004 EDT
Modified files: (Branch: MDB_1)
/pear/MDB/tests MDB_bugs_testcase.php
Log:
- fixed issues in fetchMode test on pgsql
http://cvs.php.net/diff.php/pear/MDB/tests/MDB_bugs_testcase.php?r1=1.5.4.11&r2=1.5.4.12&ty=u
Index: pear/MDB/tests/MDB_bugs_testcase.php
diff -u pear/MDB/tests/MDB_bugs_testcase.php:1.5.4.11 pear/MDB/tests/MDB_bugs_testcase.php:1.5.4.12
--- pear/MDB/tests/MDB_bugs_testcase.php:1.5.4.11 Tue Mar 9 09:11:46 2004
+++ pear/MDB/tests/MDB_bugs_testcase.php Fri Mar 12 09:16:09 2004
@@ -153,15 +153,14 @@
$this->db->freePreparedQuery($prepared_query);
- $result = $this->db->query('SELECT * FROM users ORDER BY user_name');
+ $result = $this->db->query('SELECT user_name, user_id, quota FROM users ORDER BY
user_name');
if (MDB::isError($result)) {
$this->assertTrue(false, 'Error selecting from
users'.$result->getMessage());
}
$this->db->setFetchMode(MDB_FETCHMODE_ASSOC);
$firstRow = $this->db->fetchRow($result);
- $this->assertEquals($firstRow['user_name'], $data[0]['user_name'],
"The data returned ($firstRow[user_name]) does not match that expected
(".$data[0]['user_name'].")");
-
+ $this->assertEquals($data[0]['user_name'], $firstRow['user_name'],
"The data returned ($firstRow[user_name]) does not match that expected
(".$data[0]['user_name'].")");
$result = $this->db->query('SELECT user_name, user_id, quota FROM users ORDER BY
user_name');
if (MDB::isError($result)) {
@@ -169,8 +168,8 @@
}
$this->db->setFetchMode(MDB_FETCHMODE_ORDERED);
- $field = $this->db->fetchOne($result);
- $this->assertEquals($field, $data[0]['user_name'], "The data returned
($field) does not match that expected (".$data[0]['user_name'].")");
+ $firstRow = $this->db->fetchRow($result);
+ $this->assertEquals($data[0]['user_name'], $firstRow[0], "The data
returned ($firstRow[0]) does not match that expected
(".$data[0]['user_name'].")");
}
/**