php-sqlsrv/test/functional/pdo_sqlsrv/PDO11_Drivers.phpt

24 lines
452 B
Plaintext
Raw Normal View History

2017-05-03 22:09:02 +02:00
--TEST--
PDO Drivers Info Test
--DESCRIPTION--
Verifies the functionality of "PDO:getAvailableDrivers()".
2017-05-03 22:09:02 +02:00
--ENV--
PHPT_EXEC=true
--SKIPIF--
<?php require('skipif_mid-refactor.inc'); ?>
2017-05-03 22:09:02 +02:00
--FILE--
<?php
try {
2017-05-03 22:09:02 +02:00
$drivers = PDO::getAvailableDrivers();
if (!in_array("sqlsrv", $drivers)) {
2017-05-03 22:09:02 +02:00
printf("$PhpDriver is missing.\n");
} else {
printf("Done\n");
2017-05-03 22:09:02 +02:00
}
} catch (Exception $e) {
echo $e->getMessage();
2017-05-03 22:09:02 +02:00
}
?>
--EXPECT--
Done