added test for pdo construct without server specified
This commit is contained in:
parent
4ff9aae585
commit
65c79ef344
22
test/pdo_sqlsrv/pdo_construct_no_server.phpt
Normal file
22
test/pdo_sqlsrv/pdo_construct_no_server.phpt
Normal file
|
@ -0,0 +1,22 @@
|
|||
--TEST--
|
||||
Test PDO::__Construct without specifying the Server
|
||||
--SKIPIF--
|
||||
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require_once("autonomous_setup.php");
|
||||
try
|
||||
{
|
||||
$database = "tempdb";
|
||||
// Try to connect with no server specific
|
||||
@$conn = new PDO( "sqlsrv:Database = $database", $username, $password );
|
||||
}
|
||||
catch( PDOException $e ) {
|
||||
print_r( ($e->errorInfo)[2] );
|
||||
}
|
||||
?>
|
||||
|
||||
--EXPECT--
|
||||
|
||||
Server keyword was not specified in the DSN string.
|
Loading…
Reference in a new issue