cvs: pear /MDB2/tests MDB2_api_testcase.php MDB2_testcase.php
| From: | Lukas Smith | Date: | Tue, 02 May 2006 14:59:25 +0000 |
| Subject: | cvs: pear /MDB2/tests MDB2_api_testcase.php MDB2_testcase.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-39945@lists.php.net to get a copy of this message | ||
lsmith Tue May 2 14:59:25 2006 UTC
Modified files:
/pear/MDB2/tests MDB2_api_testcase.php MDB2_testcase.php
Log:
- do not require Manager module for core API tests
http://cvs.php.net/viewcvs.cgi/pear/MDB2/tests/MDB2_api_testcase.php?r1=1.17&r2=1.18&diff_format=u
Index: pear/MDB2/tests/MDB2_api_testcase.php
diff -u pear/MDB2/tests/MDB2_api_testcase.php:1.17 pear/MDB2/tests/MDB2_api_testcase.php:1.18
--- pear/MDB2/tests/MDB2_api_testcase.php:1.17 Wed Mar 1 12:15:38 2006
+++ pear/MDB2/tests/MDB2_api_testcase.php Tue May 2 14:59:25 2006
@@ -41,11 +41,13 @@
// | Author: Paul Cooper <pgc@ucecom.com> |
// +----------------------------------------------------------------------+
//
-// $Id: MDB2_api_testcase.php,v 1.17 2006/03/01 12:15:38 lsmith Exp $
+// $Id: MDB2_api_testcase.php,v 1.18 2006/05/02 14:59:25 lsmith Exp $
require_once 'MDB2_testcase.php';
class MDB2_Api_TestCase extends MDB2_TestCase {
+ var $clear_tables = false;
+
//test stuff in common.php
function testConnect() {
$db =& MDB2::factory($this->dsn, $this->options);
http://cvs.php.net/viewcvs.cgi/pear/MDB2/tests/MDB2_testcase.php?r1=1.8&r2=1.9&diff_format=u
Index: pear/MDB2/tests/MDB2_testcase.php
diff -u pear/MDB2/tests/MDB2_testcase.php:1.8 pear/MDB2/tests/MDB2_testcase.php:1.9
--- pear/MDB2/tests/MDB2_testcase.php:1.8 Wed Mar 1 12:15:38 2006
+++ pear/MDB2/tests/MDB2_testcase.php Tue May 2 14:59:25 2006
@@ -41,7 +41,7 @@
// | Author: Paul Cooper <pgc@ucecom.com> |
// +----------------------------------------------------------------------+
//
-// $Id: MDB2_testcase.php,v 1.8 2006/03/01 12:15:38 lsmith Exp $
+// $Id: MDB2_testcase.php,v 1.9 2006/05/02 14:59:25 lsmith Exp $
class MDB2_TestCase extends PHPUnit_TestCase {
//contains the dsn of the database we are testing
@@ -56,6 +56,8 @@
var $fields;
// contains the types of the fields from the test table
var $types;
+ // if the tables should be cleared in the setUp() and tearDown() methods
+ var $clear_tables = true;
function MDB2_TestCase($name) {
$this->PHPUnit_TestCase($name);
@@ -93,6 +95,9 @@
}
function clearTables() {
+ if (!$this->clear_tables) {
+ return;
+ }
if ($this->tableExists('users') &&
PEAR::isError($this->db->exec('DELETE FROM users'))) {
$this->assertTrue(false, 'Error deleting from table users');
}