Merge pull request #481 from lilgreenbird/php72_testfixes
test fixes for PHP 7.2
This commit is contained in:
commit
259f13c45c
|
@ -35,8 +35,8 @@ function ConnectionTest()
|
||||||
// Valid connection attempt => no errors are expected
|
// Valid connection attempt => no errors are expected
|
||||||
Trace("\nValid connection attempt (to $server) ....\n");
|
Trace("\nValid connection attempt (to $server) ....\n");
|
||||||
$conn2 = Connect();
|
$conn2 = Connect();
|
||||||
$errors = sqlsrv_errors(SQLSRV_ERR_ERRORS);
|
$errors = sqlsrv_errors(SQLSRV_ERR_ERRORS);
|
||||||
if(count($errors) != 0)
|
if (!empty($errors))
|
||||||
{
|
{
|
||||||
die("No errors were expected on valid connection attempts.");
|
die("No errors were expected on valid connection attempts.");
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -72,7 +72,7 @@ function FetchField($stmt, $idx, $numFields, $errorExpected)
|
||||||
function PrintError($errorExpected = true)
|
function PrintError($errorExpected = true)
|
||||||
{
|
{
|
||||||
$errors = sqlsrv_errors(SQLSRV_ERR_ALL);
|
$errors = sqlsrv_errors(SQLSRV_ERR_ALL);
|
||||||
if (count($errors) > 0)
|
if (!empty($errors))
|
||||||
{
|
{
|
||||||
$e = $errors[0];
|
$e = $errors[0];
|
||||||
var_dump($e['message']);
|
var_dump($e['message']);
|
||||||
|
|
|
@ -52,7 +52,7 @@ sqlsrv_close($conn);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
--EXPECTREGEX--
|
--EXPECTREGEX--
|
||||||
Notice\: Use of undefined constant SQLSRV_ENC_UNKNOWN - assumed \'SQLSRV_ENC_UNKNOWN\' in .+(\/|\\)sqlsrv_input_param_unknown_encoding\.php on line 26
|
(Warning|Notice)\: Use of undefined constant SQLSRV_ENC_UNKNOWN - assumed \'SQLSRV_ENC_UNKNOWN\' (\(this will throw an Error in a future version of PHP\) )?in .+(\/|\\)sqlsrv_input_param_unknown_encoding\.php on line 26
|
||||||
Array
|
Array
|
||||||
\(
|
\(
|
||||||
\[0\] => Array
|
\[0\] => Array
|
||||||
|
@ -67,7 +67,7 @@ Array
|
||||||
|
|
||||||
\)
|
\)
|
||||||
|
|
||||||
Notice\: Use of undefined constant SQLSRV_ENC_UNKNOWN - assumed \'SQLSRV_ENC_UNKNOWN\' in .+(\/|\\)sqlsrv_input_param_unknown_encoding\.php on line 33
|
(Warning|Notice)\: Use of undefined constant SQLSRV_ENC_UNKNOWN - assumed \'SQLSRV_ENC_UNKNOWN\' (\(this will throw an Error in a future version of PHP\) )?in .+(\/|\\)sqlsrv_input_param_unknown_encoding\.php on line 33
|
||||||
Array
|
Array
|
||||||
\(
|
\(
|
||||||
\[0\] => Array
|
\[0\] => Array
|
||||||
|
@ -81,4 +81,3 @@ Array
|
||||||
\)
|
\)
|
||||||
|
|
||||||
\)
|
\)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue