Some test fixes for 8.2

This commit is contained in:
v-makouz 2022-12-05 10:48:34 -08:00
parent 25c8a200a5
commit efd594b8cf
10 changed files with 17 additions and 4 deletions

View file

@ -12,6 +12,7 @@ require('skipif_versions_old.inc');
<?php
require_once('MsCommon.inc');
#[AllowDynamicProperties]
class TestClass
{
public function __construct($a1, $a2, $a3)

View file

@ -117,11 +117,11 @@ function testEncryptedWithODBC($msodbcsqlMaj, $server, $connectionOptions)
function testWrongODBC($msodbcsqlMaj, $server, $connectionOptions)
{
$value = "ODBC Driver 18 for SQL Server";
$value = "ODBC Driver 13 for SQL Server";
$connectionOptions['Driver']=$value;
$expected = "The specified ODBC Driver is not found.";
connectVerifyOutput($server, $connectionOptions, "Connect with ODBC 18", $expected);
connectVerifyOutput($server, $connectionOptions, "Connect with ODBC 13", $expected);
}
?>

View file

@ -61,7 +61,7 @@ function isDataClassSupported($conn, &$driverCapable)
// ODBC Driver must be 17.2 or above
$driverCapable = true;
if ($version[0] < 17 || $version[1] < 2) {
if ($version[0] < 17 || ($version[0] == 17 && $version[1] < 2)) {
$driverCapable = false;
return false;
}

View file

@ -63,7 +63,7 @@ function isDataClassSupported($conn, &$driverCapable)
// ODBC Driver must be 17.2 or above
$driverCapable = true;
if ($version[0] < 17 || $version[1] < 2) {
if ($version[0] < 17 || ($version[0] == 17 && $version[1] < 2)) {
$driverCapable = false;
return false;
}

View file

@ -5,6 +5,7 @@ Test for fetch_object
--FILE--
<?php
#[AllowDynamicProperties]
class foo
{
public $stuff = "stuff";
@ -25,6 +26,7 @@ class foo
}
}
#[AllowDynamicProperties]
class foo_noargs
{
public $stuff = "stuff";

View file

@ -5,6 +5,7 @@ Test for fetch_object
--FILE--
<?php
#[AllowDynamicProperties]
class foo
{
public $stuff = "stuff";
@ -25,6 +26,7 @@ class foo
}
}
#[AllowDynamicProperties]
class foo_noargs
{
public $stuff = "stuff";

View file

@ -4,6 +4,7 @@ Test insert various data types and fetch as strings
<?php
require_once('MsCommon.inc');
#[AllowDynamicProperties]
class TestClass2
{
public function __construct($a1, $a2)
@ -12,6 +13,7 @@ class TestClass2
}
}
#[AllowDynamicProperties]
class TestClass3
{
public function __construct($a1, $a2, $a3)

View file

@ -5,6 +5,7 @@ Test for fetch_object with Unicode column name
--FILE--
<?php
#[AllowDynamicProperties]
class foo
{
public $stuff = "stuff";
@ -25,6 +26,7 @@ class foo
}
}
#[AllowDynamicProperties]
class foo_noargs
{
public $stuff = "stuff";

View file

@ -6,6 +6,7 @@ sqlsrv_fetch_object() into a class with Unicode column name
<?php
// Define the Product class
#[AllowDynamicProperties]
class Product
{
public function __construct($ID, $UID)
@ -37,6 +38,7 @@ class Product
}
}
#[AllowDynamicProperties]
class Sample extends Product
{
public function __construct($ID)

View file

@ -4,6 +4,8 @@ Send a large amount (10MB) using encryption. In a Linux CI environment use a sma
<?php require('skipif_azure_dw.inc'); ?>
--FILE--
<?php
#[AllowDynamicProperties]
class my_stream
{
public $total_read = 0;