Blame | Letzte Änderung | Log anzeigen | RSS feed
This is a test framework for MDB built using PHPUnit. Currently allthe tests from the metabase driver_test.php have been ported.These tests directly access the MDB API, unlike driver_test.phpwhich uses the metabase wrapper - hopefully this framework should givebetter feedback as to where or what caused when error are encountered. Thedriver_test.php is still very useful for testing the metabasecompatability.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 haveproblems running the manager test or the driver you are using does not yetprovide the necessary methods you may create the database manually. In thefuture we will probably provide SQL files for every supported database.To setup the tests* requires PHPUnit to be installed* requires MDB to be installed in a php include path or the tests need to bemoved into the MDB root path.* copy the file test_setup.php.dist to test_setup.php* edit test_setup.php. The array $testarray specifies which testcasesto carry out. Currently only MDB_usage_testcase is release quality.$dbarray is an array of databases to test.* point your browser at test.php for the results, and then fix thebugs!* by default test.php will use all tests in the testcases - ifyou want to pick specific tests, use testchoose.php to pick just thetests you want to runWriting tests:The tests are written using PHPUnit from pear so first make sure youhave the latest stable release, and have read the docs,http://pear.php.net/manual/en/packages.phpunit.phpThere are currently 4 test cases in development,MDB_usage_testcase.php - port of the driver_test.php from metabaseMDB_api_testcase.php - test(s) for each method in the driver apiMDB_manager_testcase.php - test(s) for each method in the manager apiMDB_bugs_testcase.php - each time a MDB bug is found a test shouldbe added here.