cvs: pear /XML_Query2XML README

From: Date: Sun, 29 Oct 2006 12:11:38 +0000
Subject: cvs: pear /XML_Query2XML README
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-42878@lists.php.net to get a copy of this message
lukasfeiler Sun Oct 29 12:11:38 2006 UTC Modified files: /pear/XML_Query2XML README Log: documented phpt unit tests; references to testCases.sh removed http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/README?r1=1.3&r2=1.4&diff_format=u Index: pear/XML_Query2XML/README diff -u pear/XML_Query2XML/README:1.3 pear/XML_Query2XML/README:1.4 --- pear/XML_Query2XML/README:1.3 Sat Oct 14 19:29:58 2006 +++ pear/XML_Query2XML/README Sun Oct 29 12:11:38 2006 @@ -1,6 +1,6 @@ Query2XML ========= -Version: $Id: README,v 1.3 2006/10/14 19:29:58 lukasfeiler Exp $ +Version: $Id: README,v 1.4 2006/10/29 12:11:38 lukasfeiler Exp $ 1. Overview 2. Contents of this package @@ -35,50 +35,48 @@ | +---case08 .......... Case 08: Case 06 revisited: Making use of Mappers +---XML ................. CONTAINS THE ACTUAL Query2XML.php that | will be installed in $PHP_PEAR_INSTALL_DIR/XML/ -+---tests ............... contains 168 unit tests and a special test script - named testCases.sh; all will be installed in - $PHP_PEAR_TEST_DIR/XML_Query2XML/tests. Please ++---tests ............... contains 398 phpt unit tests; all will be installed + in $PHP_PEAR_TEST_DIR/XML_Query2XML/tests. Please see 3. Testing. 3. Testing ---------- -After installation $PHP_PEAR_TEST_DIR/XML_Query2XML/tests will contain -the following files: -- Query2XMLTest.php ................. 3 unit tests that do not require - any database abstraction layer to - be present -- Query2XMLTestDB.php ............... 68 unit tests that require PEAR DB -- Query2XMLTestMDB2.php ............. 71 unit tests that require PEAR MDB2 -- Query2XMLTestADOdb.php ............ 70 unit tests that require ADOdb -- Query2XMLTestADOdbPEAR.php ........ 70 unit tests that require ADOdb which - is using PEAR_Error for error handling -- Query2XMLTestADOdbException.php ... 70 unit tests that require ADOdb which - is using exceptions for error handling -- ISO9075MapperTest.php ............. 26 unit tests fot the class - XML_Query2XML_ISO9075Mapper -- testCases.sh ........... special test script; see below -- Query2XML_Tests.sql .... The SQL DDL required to run Query2XMLTest.php - and testCases.sh - -*.php test files can be run like this: -``phpunit Query2XMLTest.php'' -For complex test cases, an MD5 hash will be generated for all the -XML data. Such a test will fail if the generated MD5 hash does not -match the MD5 hash defined in the test case. To find out what really -went wrong, use testCases.sh. - -To get Query2XMLTestDB.php, Query2XMLTestMDB2.php or Query2XMLTestADOdb*.php -working, you will have to change the the default DSN -mysql://root@localhost/Query2XML_Tests within the files. - -ISO9075MapperTest.php can be run like this: -``phpunit ISO9075MapperTest.php'' - -testCases.sh is a very useful bash script that will compare the -generated XML data with the test cases in $PHP_PEAR_DOC_DIR. -Run it from the directory $PHP_PEAR_TEST_DIR/XML_Query2XML/tests: -./testCases.sh +Before you can actually run the unit tests you should: +- run the MySQL DDL from $PHP_PEAR_TEST_DIR/XML_Query2XML/tests/Query2XML_Tests.sql +- Edit $PHP_PEAR_TEST_DIR/XML_Query2XML/tests/XML_Query2XML/settings.php + to change the DSN used to connect to the MySQL database. The default + DSN is "mysql://root@localhost/Query2XML_Tests". +- install XML_Beautifier (otherwise some tests will be skipped) + +You can run all phpt unit tests by executing the following command: + + `pear run-tests -p XML_Query2XML' + +Read on for more information about the php unit tests. After installation +$PHP_PEAR_TEST_DIR/XML_Query2XML/tests will contain the following +(all paths relative to $PHP_PEAR_TEST_DIR/XML_Query2XML/tests): + +./Query2XML_Tests.sql ........... the SQL DDL required to run the unit tests +./XML_Query2XML_ISO9075Mapper ... unit tests for XML_Query2XML_ISO9075Mapper +./XML_Query2XML/ ................ phpt unit tests for XML_Query2XML +./XML_Query2XML/DB .............. phpt unit tests for XML_Query2XML using PEAR DB +./XML_Query2XML/MDB2 ............ phpt unit tests for XML_Query2XML using PEAR MDB2 +./XML_Query2XML/ADOdbDefault .... phpt unit tests for XML_Query2XML using ADOdB + with default error handling +./XML_Query2XML/ADOdbException .. phpt unit tests for XML_Query2XML using ADOdB + with Exceptions +./XML_Query2XML/ADOdbPEAR ....... phpt unit tests for XML_Query2XML using ADOdB + with PEAR_Error + +Each of the ./XML_Query2XML/*/ directories contains subdirectories named +like methods of XML_Query2XML; the directories contain phpt unit tests for +the respective method. + +If a specific database abstraction layer (DB/MDB2/ADOdb) is not installed +the respective tests will be skipped. If XML_Beautifier is not installed +some test will also be skipped. If I18N_UnicodeString is not installed +all tests for XML_Query2XML_ISO9075Mapper will be skipped. 4. ChangeLog @@ -90,6 +88,7 @@ (until v0.6.0) ChangeLog .................... ChangeLog entries from cvs.php.net + 5. About the author ------------------- Please see http://www.lukasfeiler.com or write to lukas.feiler@lukasfeiler.com.

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