Fix coverage by moving phpunit folder back into tests
This commit is contained in:
parent
e0782dd55e
commit
deb9237532
@ -13,7 +13,7 @@ before_script:
|
|||||||
- sh -c "psql -c 'create database test;' -U postgres"
|
- sh -c "psql -c 'create database test;' -U postgres"
|
||||||
- sh -c "mysql -e 'create database IF NOT EXISTS test;'"
|
- sh -c "mysql -e 'create database IF NOT EXISTS test;'"
|
||||||
|
|
||||||
script: phpunit
|
script: cd tests && phpunit
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
allow_failures:
|
allow_failures:
|
||||||
|
10
common.php
10
common.php
@ -150,6 +150,14 @@ function Query($params = '')
|
|||||||
throw new BadDBDriverException('Database driver does not exist, or is not supported');
|
throw new BadDBDriverException('Database driver does not exist, or is not supported');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set additional PDO options
|
||||||
|
$options = array();
|
||||||
|
|
||||||
|
if (isset($params->options))
|
||||||
|
{
|
||||||
|
$options = (array)$params->options;
|
||||||
|
}
|
||||||
|
|
||||||
// --------------------------------------------------------------------------
|
// --------------------------------------------------------------------------
|
||||||
// Attempt to connect
|
// Attempt to connect
|
||||||
// --------------------------------------------------------------------------
|
// --------------------------------------------------------------------------
|
||||||
@ -185,7 +193,7 @@ function Query($params = '')
|
|||||||
{
|
{
|
||||||
// Create the database connection
|
// Create the database connection
|
||||||
$db = ( ! empty($params->user))
|
$db = ( ! empty($params->user))
|
||||||
? new $dbtype($dsn, $params->user, $params->pass)
|
? new $dbtype($dsn, $params->user, $params->pass, $options)
|
||||||
: new $dbtype($dsn);
|
: new $dbtype($dsn);
|
||||||
}
|
}
|
||||||
catch(Exception $e)
|
catch(Exception $e)
|
||||||
|
38
phpunit.xml
38
phpunit.xml
@ -1,38 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<phpunit
|
|
||||||
colors="true"
|
|
||||||
stopOnFailure="false"
|
|
||||||
bootstrap="tests/bootstrap.php">
|
|
||||||
<filter>
|
|
||||||
<blacklist>
|
|
||||||
<directory suffix=".php">coverage</directory>
|
|
||||||
<directory suffix=".php">docs</directory>
|
|
||||||
<directory suffix=".php">tests</directory>
|
|
||||||
<directory suffix=".php">vendor</directory>
|
|
||||||
<directory suffix=".php">.</directory>
|
|
||||||
</blacklist>
|
|
||||||
</filter>
|
|
||||||
<testsuites>
|
|
||||||
<testsuite name="CoreTests">
|
|
||||||
<file>tests/core/core.php</file>
|
|
||||||
<file>tests/core/db_qp_test.php</file>
|
|
||||||
</testsuite>
|
|
||||||
<testsuite name="FirebirdTests">
|
|
||||||
<file>tests/databases/firebird/FirebirdTest.php</file>
|
|
||||||
<file>tests/databases/firebird/FirebirdQBTest.php</file>
|
|
||||||
</testsuite>
|
|
||||||
<testsuite name="MySQLTests">
|
|
||||||
<file>tests/databases/mysql/MySQLTest.php</file>
|
|
||||||
<file>tests/databases/mysql/MySQLQBTest.php</file>
|
|
||||||
</testsuite>
|
|
||||||
<testsuite name="PgSQLTests">
|
|
||||||
<file>tests/databases/pgsql/PgSQLTest.php</file>
|
|
||||||
<file>tests/databases/pgsql/PgSQLQBTest.php</file>
|
|
||||||
</testsuite>
|
|
||||||
<testsuite name="SQLiteTests">
|
|
||||||
<file>tests/databases/sqlite/SqliteTest.php</file>
|
|
||||||
<file>tests/databases/mysql/SqliteQBTest.php</file>
|
|
||||||
</testsuite>
|
|
||||||
</testsuites>
|
|
||||||
</phpunit>
|
|
36
tests/phpunit.xml
Normal file
36
tests/phpunit.xml
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<phpunit
|
||||||
|
colors="true"
|
||||||
|
stopOnFailure="false"
|
||||||
|
bootstrap="bootstrap.php">
|
||||||
|
<filter>
|
||||||
|
<blacklist>
|
||||||
|
<directory suffix=".php">../coverage</directory>
|
||||||
|
<directory suffix=".php">../docs</directory>
|
||||||
|
<directory suffix=".php">.</directory>
|
||||||
|
</blacklist>
|
||||||
|
</filter>
|
||||||
|
<testsuites>
|
||||||
|
<testsuite name="CoreTests">
|
||||||
|
<file>core/core.php</file>
|
||||||
|
<file>core/db_qp_test.php</file>
|
||||||
|
</testsuite>
|
||||||
|
<testsuite name="FirebirdTests">
|
||||||
|
<file>databases/firebird/FirebirdTest.php</file>
|
||||||
|
<file>databases/firebird/FirebirdQBTest.php</file>
|
||||||
|
</testsuite>
|
||||||
|
<testsuite name="MySQLTests">
|
||||||
|
<file>databases/mysql/MySQLTest.php</file>
|
||||||
|
<file>databases/mysql/MySQLQBTest.php</file>
|
||||||
|
</testsuite>
|
||||||
|
<testsuite name="PgSQLTests">
|
||||||
|
<file>databases/pgsql/PgSQLTest.php</file>
|
||||||
|
<file>databases/pgsql/PgSQLQBTest.php</file>
|
||||||
|
</testsuite>
|
||||||
|
<testsuite name="SQLiteTests">
|
||||||
|
<file>databases/sqlite/SqliteTest.php</file>
|
||||||
|
<file>databases/mysql/SqliteQBTest.php</file>
|
||||||
|
</testsuite>
|
||||||
|
</testsuites>
|
||||||
|
</phpunit>
|
Loading…
Reference in New Issue
Block a user