Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Introduction to CUBRID PDO Driver Unit Tests

There are some test cases in directory tests. These unit tests are changed based on test cases of PHP PDO, which using the PHP official unit test mechanism. The script run-tests.php is PHP official unit test tool.

Configuring the Test

Before running these unit tests, you should add the CUBRID database information on you system in

Make sure that the demodb is created in CUBRID, and set db to demodb. The "demodb" normally will be created when you install CUBRID. If you didn't install it, you can create it later. In Linux, for example, in $CUBRID/demo, run the following commands:


Then demodb will be created. You can also change the scripts and run test codes on other database.

Run Tests

Before run these unit tests, you should indicate which php executable to test by setting environment TEST_PHP_EXECUTABLE. Then run test codes on command line:

For example:

php run-tests.php pdo_001.phpt

Test Result

Number of tests :



Tests skipped :

0 ( 0.0%)


Tests warned :

0 ( 0.0%)

( 0.0%)

Tests failed :

2 ( 3.2%)

( 3.2%)

Expected fail :

1 ( 1.6%)

( 1.6%)

Tests passed :

59 ( 95.2%)

( 95.2%)

Time taken :

12 seconds


PDO Common: Bug #43130 (Bound parameters cannot have - in their name) bug_43130.phpt
PDO Common: PDOStatement::getColumnMeta pdo_022.phpt


PDO Common: Bug #34630 (inserting streams as LOBs) bug_34630.phpt

Result Analysis

bug_43130.phpt: The output of CUBRID PDO is different with expected output. Just remember that don't use - in named parameter. pdo_022.phpt: CUBRID don't support getColumnMeta. If you want get meta information, please use PDO::cubrid_schema.

comments powered by Disqus
Page info
viewed 3469 times
translations en
posted 6 years ago by
updated 5 years ago by
View revisions
Share this article