1
0
mirror of https://github.com/dg/dibi.git synced 2025-07-31 19:30:30 +02:00

tests: not supported drivers are not skipped (except for 'mysql' on PHP 7)

This commit is contained in:
David Grudl
2015-11-04 15:00:29 +01:00
parent deb56bb166
commit 607ec8ae77

View File

@@ -35,14 +35,14 @@ if ($config['system'] === 'odbc') {
$config['dsn'] = str_replace('data/odbc.mdb', TEMP_DIR . '/odbc.mdb', $config['dsn']);
}
try {
new Dibi\Connection($config);
} catch (Dibi\NotSupportedException $e) {
Tester\Environment::skip($e->getMessage());
if ($config['driver'] === 'mysql' && PHP_VERSION_ID >= 70000) {
Tester\Environment::skip('mysql driver is not supported on PHP 7');
}
$conn = new Dibi\Connection($config);
function test(Closure $function)
{
$function();