cvs: pear /MDB2/tests README test_setup.php.dist
| From: | Lukas Smith | Date: | Thu, 23 Mar 2006 07:33:09 +0000 |
| Subject: | cvs: pear /MDB2/tests README test_setup.php.dist | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-39277@lists.php.net to get a copy of this message | ||
lsmith Thu Mar 23 07:33:09 2006 UTC
Modified files:
/pear/MDB2/tests README test_setup.php.dist
Log:
- improve test suite documentation
http://cvs.php.net/viewcvs.cgi/pear/MDB2/tests/README?r1=1.4&r2=1.5&diff_format=u
Index: pear/MDB2/tests/README
diff -u pear/MDB2/tests/README:1.4 pear/MDB2/tests/README:1.5
--- pear/MDB2/tests/README:1.4 Sat Dec 3 07:36:12 2005
+++ pear/MDB2/tests/README Thu Mar 23 07:33:09 2006
@@ -1,21 +1,39 @@
-This is a test framework for MDB2 built using PHPUnit. Currently all
-the tests from the metabase driver_test.php have been ported.
+This is a test framework for MDB2 built using PHPUnit.
These tests directly access the MDB2 API - hopefully this framework
should give better feedback as to where or what caused when error are encountered.
Usage:
In order for the tests to work they need to access a database called
-"driver_test". This database is created in the manager test. If you have
-problems running the manager test or the driver you are using does not yet
-provide the necessary methods you may create the database manually. In the
-future we will probably provide SQL files for every supported database.
+"driver_test". This database is created using the MDB2_Schema test. If you have
+problems running these test or the driver you are using does not yet
+provide the necessary methods you may create the "driver_test" database manually:
+
+CREATE TABLE "files" (
+ "id" int(11) NOT NULL default '0',
+ "document" longtext,
+ "picture" longblob,
+ UNIQUE KEY "lob_id_index_idx" ("id")
+);
+
+CREATE TABLE "users" (
+ "user_name" char(12) default NULL,
+ "user_password" text,
+ "subscribed" tinyint(1) default '1',
+ "user_id" int(11) NOT NULL default '0',
+ "quota" decimal(18,2) default '0.00',
+ "weight" double default '0',
+ "access_date" date default '1970-01-01',
+ "access_time" time default '00:00:00',
+ "approved" datetime default '1970-01-01 00:00:00',
+ UNIQUE KEY "users_id_index_idx" ("user_id")
+);
To setup the tests
* requires PHPUnit to be installed
-* requires MDB2 to be installed in a php include path or the tests need to be
- moved into the MDB2 root path.
+* requires MDB2 (with the given driver) to be installed
+ in a php include path.
* copy the file test_setup.php.dist to test_setup.php
http://cvs.php.net/viewcvs.cgi/pear/MDB2/tests/test_setup.php.dist?r1=1.12&r2=1.13&diff_format=u
Index: pear/MDB2/tests/test_setup.php.dist
diff -u pear/MDB2/tests/test_setup.php.dist:1.12 pear/MDB2/tests/test_setup.php.dist:1.13
--- pear/MDB2/tests/test_setup.php.dist:1.12 Mon Jan 16 16:26:01 2006
+++ pear/MDB2/tests/test_setup.php.dist Thu Mar 23 07:33:09 2006
@@ -1,5 +1,8 @@
<?php
+// uncomment this line if you want to run both MDB2 from a CVS checkout
+#ini_set('include_path',
'..'.PATH_SEPARATOR.ini_get('include_path'));
+
$testcases = array(
'MDB2_manager_testcase',
'MDB2_api_testcase',