Fixed the failing tests
This commit is contained in:
parent
bad65817e1
commit
ebbb676b8a
|
@ -105,10 +105,11 @@ function testInvalidValues()
|
||||||
function testEncryptedWithODBC()
|
function testEncryptedWithODBC()
|
||||||
{
|
{
|
||||||
// Skip this function if running outside Windows
|
// Skip this function if running outside Windows
|
||||||
if (!strtoupper(substr(php_uname('s'), 0, 3)) === 'WIN') {
|
if (!(strtoupper(substr(PHP_OS, 0, 3)) === 'WIN')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
return (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN');
|
||||||
|
|
||||||
global $msodbcsqlMaj, $server, $uid, $pwd;
|
global $msodbcsqlMaj, $server, $uid, $pwd;
|
||||||
|
|
||||||
$value = "ODBC Driver 13 for SQL Server";
|
$value = "ODBC Driver 13 for SQL Server";
|
||||||
|
|
|
@ -6,13 +6,12 @@ if (!extension_loaded("pdo") || !extension_loaded('pdo_sqlsrv')) {
|
||||||
require_once("MsSetup.inc");
|
require_once("MsSetup.inc");
|
||||||
require_once("MsCommon_mid-refactor.inc");
|
require_once("MsCommon_mid-refactor.inc");
|
||||||
|
|
||||||
|
|
||||||
$dsn = getDSN($server, null);
|
$dsn = getDSN($server, null);
|
||||||
$conn = new PDO($dsn, $uid, $pwd);
|
$conn = new PDO($dsn, $uid, $pwd);
|
||||||
if (! $conn) {
|
if (! $conn) {
|
||||||
echo("Error: could not connect during SKIPIF!");
|
echo("Error: could not connect during SKIPIF!");
|
||||||
} elseif (isColEncrypted()) {
|
} elseif (isColEncrypted()) {
|
||||||
if (!strtoupper(substr(php_uname('s'), 0, 3)) === 'WIN') {
|
if (!(strtoupper(substr(PHP_OS, 0, 3)) === 'WIN')) {
|
||||||
die( "Skip, AE test on windows only." );
|
die( "Skip, AE test on windows only." );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,15 +4,13 @@ if (! extension_loaded("sqlsrv")) {
|
||||||
die("skip extension not loaded");
|
die("skip extension not loaded");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !( strtoupper( substr( php_uname( 's' ),0,3 ) ) === 'WIN' ) ) die( "Skip, AE test on windows only." );
|
|
||||||
|
|
||||||
require_once('MsCommon.inc');
|
require_once('MsCommon.inc');
|
||||||
|
|
||||||
$conn = AE\connect();
|
$conn = AE\connect();
|
||||||
if (! $conn) {
|
if (! $conn) {
|
||||||
echo("Error: could not connect during SKIPIF!");
|
echo("Error: could not connect during SKIPIF!");
|
||||||
} elseif (AE\isColEncrypted()) {
|
} elseif (AE\isColEncrypted()) {
|
||||||
if (!strtoupper(substr(php_uname('s'), 0, 3)) === 'WIN') {
|
if (!isWindows()) {
|
||||||
die( "Skip, AE test on windows only." );
|
die( "Skip, AE test on windows only." );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -103,7 +103,7 @@ function testInvalidValues($msodbcsqlMaj, $server, $connectionOptions)
|
||||||
function testEncryptedWithODBC($msodbcsqlMaj, $server, $connectionOptions)
|
function testEncryptedWithODBC($msodbcsqlMaj, $server, $connectionOptions)
|
||||||
{
|
{
|
||||||
// Skip this function if running outside Windows
|
// Skip this function if running outside Windows
|
||||||
if (!strtoupper(substr(php_uname('s'), 0, 3)) === 'WIN') {
|
if (!isWindows()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue