Skip to content

Commit

Permalink
Use helper method isAEQualified instead
Browse files Browse the repository at this point in the history
  • Loading branch information
yitam committed Apr 30, 2018
1 parent 2fc3afe commit 06e9297
Showing 1 changed file with 1 addition and 23 deletions.
24 changes: 1 addition & 23 deletions test/functional/pdo_sqlsrv/pdo_707_ae_output_param_decimals.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,6 @@ require_once("MsCommon_mid-refactor.inc");

$error = "Error converting a double (value out of range) to an integer";

function skipTest($conn)
{
$msodbcsql_ver = $conn->getAttribute(PDO::ATTR_CLIENT_VERSION)["DriverVer"];
$msodbcsql_maj = explode(".", $msodbcsql_ver)[0];
if ($msodbcsql_maj < 17) {
return true;
}

global $daasMode;
if ($daasMode) {
// running against Azure
return false;
}
// otherwise, check server version
$server_ver = $conn->getAttribute(PDO::ATTR_SERVER_VERSION);
if (explode('.', $server_ver)[0] < 13) {
return true;
}

return false;
}

function getOutputs($stmt, $outSql, $id, $pdoParamType, $inout = false)
{
$dec = $num = 0;
Expand Down Expand Up @@ -108,7 +86,7 @@ function getHugeNumbers($conn, $outSql)
try {
// Check eligibility
$conn = new PDO( "sqlsrv:server = $server", $uid, $pwd );
if (skipTest($conn)) {
if (!isAEQualified($conn)) {
echo "Done\n";
return;
}
Expand Down

0 comments on commit 06e9297

Please sign in to comment.