diff --git a/test/functional/sqlsrv/0069.phpt b/test/functional/sqlsrv/0069.phpt index d7a78e71..aa81a1f5 100644 --- a/test/functional/sqlsrv/0069.phpt +++ b/test/functional/sqlsrv/0069.phpt @@ -43,7 +43,6 @@ Variety of connection parameters. $conn = AE\connect(); $tableName = 'php_table_SERIL1_1'; - dropTable($conn, $tableName); if (AE\isColEncrypted()) { // With AE enabled, the sql types and SQLSRV SQLTYPES have to match exactly when binding // Since SQLSRV SQLTYPES with datetime columns have no options for precision/scale, @@ -53,6 +52,7 @@ Variety of connection parameters. new AE\ColumnMeta('time', 'c3_time')); $stmt = AE\createTable($conn, $tableName, $columns); } else { + dropTable($conn, $tableName); $stmt = sqlsrv_query($conn, "CREATE TABLE $tableName ([c1_datetime2] datetime2(0), [c2_datetimeoffset] datetimeoffset(0), [c3_time] time(0))"); } if (!$stmt) { diff --git a/test/functional/sqlsrv/0074.phpt b/test/functional/sqlsrv/0074.phpt index 877d4262..14ea08df 100644 --- a/test/functional/sqlsrv/0074.phpt +++ b/test/functional/sqlsrv/0074.phpt @@ -17,7 +17,7 @@ require_once('MsCommon.inc'); $conn = AE\connect(); // drop the procedure if exists -$stmt = sqlsrv_query($conn, "IF OBJECT_ID('sp_MakeSubject', 'P') IS NOT NULL DROP PROCEDURE sp_MakeSubject"); +dropProc($conn, 'sp_MakeSubject'); // Create Table 'Subjects' but do not encrypt the first column because in the stored procedure // we rely on the server to get the current date time. With Column Encryption, all input values @@ -79,7 +79,7 @@ if ($stmt === false) { $tsql_callSP = "{call sp_MakeSubject(?,?,?,?)}"; $introText="X"; -// With AE, the sql type has to match the column definition +// With AE, the sql type has to match the stored procedure parameter definition $outSQLType = AE\isColEncrypted() ? SQLSRV_SQLTYPE_NVARCHAR('max') : SQLSRV_SQLTYPE_NVARCHAR(256); $params = array( array( 1, SQLSRV_PARAM_IN, SQLSRV_PHPTYPE_INT, SQLSRV_SQLTYPE_INT ), diff --git a/test/functional/sqlsrv/skipif_not_ksp.inc b/test/functional/sqlsrv/skipif_not_ksp.inc index 08e25179..682e578b 100644 --- a/test/functional/sqlsrv/skipif_not_ksp.inc +++ b/test/functional/sqlsrv/skipif_not_ksp.inc @@ -5,8 +5,9 @@ if (!extension_loaded("sqlsrv")) require_once('MsCommon.inc'); -if ($keystore != AE\KEYSTORE_KSP) +if ($keystore != AE\KEYSTORE_KSP) { die('skip - this test requires a custom keystore provider.'); +} $conn = AE\connect(); if (! $conn) { diff --git a/test/functional/sqlsrv/sqlsrv_bind_param_out_string.phpt b/test/functional/sqlsrv/sqlsrv_bind_param_out_string.phpt index b8c14326..0644f124 100644 --- a/test/functional/sqlsrv/sqlsrv_bind_param_out_string.phpt +++ b/test/functional/sqlsrv/sqlsrv_bind_param_out_string.phpt @@ -344,8 +344,6 @@ $actualValue = $return; $actualLength = strlen($return); compareResults($expectedLength, $expectedValue, $actualLength, $actualValue); -// sqlsrv_query($conn, "DROP TABLE BindStringTest"); -// sqlsrv_query($conn, "DROP PROCEDURE uspPerson"); dropTable($conn, $tableName); dropProc($conn, 'uspPerson'); diff --git a/test/functional/sqlsrv/sqlsrv_bug_boolean_cast_inout_bit.phpt b/test/functional/sqlsrv/sqlsrv_bug_boolean_cast_inout_bit.phpt index 290ab9b4..55324e54 100644 --- a/test/functional/sqlsrv/sqlsrv_bug_boolean_cast_inout_bit.phpt +++ b/test/functional/sqlsrv/sqlsrv_bug_boolean_cast_inout_bit.phpt @@ -14,7 +14,7 @@ require_once('MsCommon.inc'); $conn = AE\connect(); -$stmt = sqlsrv_query($conn, "IF OBJECT_ID('testBoolean', 'P') IS NOT NULL DROP PROCEDURE testBoolean"); +dropProc($conn, 'testBoolean'); $createSP = <<