Fixed pdo test
This commit is contained in:
parent
51c45a26b8
commit
e031c1a3fa
|
@ -38,7 +38,7 @@ function invalidServer()
|
||||||
echo "Should have failed to connect to invalid server.\n";
|
echo "Should have failed to connect to invalid server.\n";
|
||||||
} catch (PDOException $e) {
|
} catch (PDOException $e) {
|
||||||
$error1 = '*Login timeout expired';
|
$error1 = '*Login timeout expired';
|
||||||
$error2 = '*An error occurred translating the connection string to UTF-16: No mapping for the Unicode character exists in the target multi-byte code page*';
|
$error2 = '*An error occurred translating the connection string to UTF-16: *';
|
||||||
if (fnmatch($error1, $e->getMessage()) || fnmatch($error2, $e->getMessage())) {
|
if (fnmatch($error1, $e->getMessage()) || fnmatch($error2, $e->getMessage())) {
|
||||||
; // matched at least one of the expected error messages
|
; // matched at least one of the expected error messages
|
||||||
} else {
|
} else {
|
||||||
|
@ -102,7 +102,7 @@ function invalidPassword()
|
||||||
$options = array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION);
|
$options = array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION);
|
||||||
|
|
||||||
// Possible errors
|
// Possible errors
|
||||||
$error = "*An error occurred translating the connection string to UTF-16: No mapping for the Unicode character exists in the target multi-byte code page.*";
|
$error = "*An error occurred translating the connection string to UTF-16: *";
|
||||||
$error1 = "*Login failed for user \'*\'.";
|
$error1 = "*Login failed for user \'*\'.";
|
||||||
$error2 = "*Login timeout expired*";
|
$error2 = "*Login timeout expired*";
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue