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

26 lines
491 B
Plaintext
Raw Normal View History

2017-04-03 23:01:30 +02:00
--TEST--
Test PDO::__Construct with invalid connection option
2017-04-03 23:01:30 +02:00
--SKIPIF--
<?php require('skipif_mid-refactor.inc'); ?>
2017-04-03 23:01:30 +02:00
--FILE--
<?php
require_once("MsCommon_mid-refactor.inc");
2017-04-03 23:01:30 +02:00
try {
$conn = connect("InvalidKey = true;");
echo "Test Successful";
} catch (PDOException $e) {
var_dump($e->errorInfo);
2017-04-03 23:01:30 +02:00
}
?>
2017-04-03 23:01:30 +02:00
--EXPECT--
array(3) {
[0]=>
string(5) "IMSSP"
[1]=>
int(-42)
[2]=>
string(64) "An invalid keyword 'InvalidKey' was specified in the DSN string."
}
Test Successful