Downloads

 

Pkg: MySQL – Unit Tests

The Mysql package contains 4 unit test files (one for each class). These files are located in the ‘unitTests’ directory of the download package. Each file name begins with the class it tests and ends with ‘_test.php’. There is also a fifth file named ‘run_all.php’ this will run all unit tests contained in the four *_test.php files. The unit tests can be run separately (by loading the appropriate file in a browser, or through the command line) or you may run a complete test of the entire package by loading the ‘run_all.php’ file.

 

Configuration

Before running any of the unit tests you will need to make changes in two files: ‘simpletest_config.php’ and ‘mysql_config.php’.

simpletest_config.php – This file (surprise!) contains the configuration settings for SimpleTest. You will only need to change line 29 to the path where SimpleTest is located on your machine.

mysql_config.php – This file contains the MySQL configuration settings. You will need to edit the configuration settings for your MySQL installation. Most notably you will need to edit: USERNAME, PASSWORD, HOST, and *DB_NAME*

!!! IMPORTANT DO NOT USE AN EXISTING DATABASE IT WILL AUTOMATICALLY BE DELETED AT THE END OF THE TEST !!!

DB_NAME – When a unit test is run the script creates a new database on the server and creates a table with some dummy data to run tests against. This database is automatically deleted at the beginning and end of the test.

!!! IMPORTANT DO NOT USE AN EXISTING DATABASE IT WILL AUTOMATICALLY BE DELETED AT THE END OF THE TEST !!!

 

Run Tests

Using the links below you may run any or all of the unit test for the Mysql Package.

 

Unit Test Platform

The unit tests for the Mysql package were written using SimpleTest. To find out more about SimpleTest please visit:

The SimpleTest Website

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Improve the web with Nofollow Reciprocity.