@@ -5,25 +5,7 @@ Verifies that the problem is no longer reproducible.
5
5
--ENV--
6
6
PHPT_EXEC=true
7
7
--SKIPIF--
8
- <?php
9
- if (! extension_loaded ("sqlsrv " )) {
10
- die ("skip extension not loaded " );
11
- }
12
-
13
- require_once ('MsCommon.inc ' );
14
-
15
- // This test requires to connect with the Always Encrypted feature
16
- // First check if the system is qualified to run this test
17
- $ options = array ("Database " => $ database , "UID " => $ userName , "PWD " => $ userPassword );
18
- $ conn = sqlsrv_connect ($ server , $ options );
19
- if ($ conn === false ) {
20
- die ("Error: could not connect during SKIPIF! " );
21
- }
22
-
23
- if (!AE \isQualified ($ conn )) {
24
- die ("skip - AE feature not supported in the current environment. " );
25
- }
26
- ?>
8
+ <?php require ('skipif_versions_old.inc ' ); ?>
27
9
--FILE--
28
10
<?php
29
11
@@ -37,8 +19,22 @@ function verifyFetchError()
37
19
38
20
require_once ('MsCommon.inc ' );
39
21
22
+ // This test requires to connect with the Always Encrypted feature
23
+ // First check if the system is qualified to run this test
24
+ $ options = array ("Database " => $ database , "UID " => $ userName , "PWD " => $ userPassword );
25
+ $ conn = sqlsrv_connect ($ server , $ options );
26
+ if ($ conn === false ) {
27
+ fatalError ("Failed to connect to $ server. " );
28
+ }
29
+
30
+ if (!AE \isQualified ($ conn )) {
31
+ echo "Done \n" ;
32
+ return ;
33
+ }
34
+ sqlsrv_close ($ conn );
35
+
40
36
// Now connect with ColumnEncryption enabled
41
- $ connectionOptions = array ( " Database " => $ database , " UID " => $ userName , " PWD " => $ userPassword , 'ColumnEncryption ' => 'Enabled ' );
37
+ $ connectionOptions = array_merge ( $ options , array ( 'ColumnEncryption ' => 'Enabled ' ) );
42
38
$ conn = sqlsrv_connect ($ server , $ connectionOptions );
43
39
if ($ conn === false ) {
44
40
fatalError ("Failed to connect to $ server. " );
0 commit comments