From 72883f7344f73ba2e9a3aeb5ae2f6db58a686dd7 Mon Sep 17 00:00:00 2001 From: Tigrov Date: Fri, 11 Oct 2024 21:25:49 +0700 Subject: [PATCH] Fix tests for 2017 --- tests/Type/CharTest.php | 2 +- tests/Type/DateTest.php | 2 +- tests/Type/DecimalTest.php | 4 ++-- tests/Type/FloatTest.php | 4 ++-- tests/Type/IntTest.php | 4 ++-- tests/Type/MoneyTest.php | 4 ++-- tests/Type/NumericTest.php | 2 +- tests/Type/RealTest.php | 4 ++-- tests/Type/SmallIntTest.php | 4 ++-- tests/Type/SmallMoneyTest.php | 4 ++-- tests/Type/TinyIntTest.php | 4 ++-- tests/Type/UniqueidentifierTest.php | 2 +- tests/Type/VarCharTest.php | 2 +- 13 files changed, 21 insertions(+), 21 deletions(-) diff --git a/tests/Type/CharTest.php b/tests/Type/CharTest.php index 6b8764da..071b9379 100644 --- a/tests/Type/CharTest.php +++ b/tests/Type/CharTest.php @@ -191,7 +191,7 @@ public function testValueException(): void $this->expectException(Exception::class); $this->expectExceptionMessage( - '[ODBC Driver 18 for SQL Server][SQL Server]String or binary data would be truncated' + '[SQL Server]String or binary data would be truncated' ); $command->insert('char', ['Mychar1' => '01234567891'])->execute(); diff --git a/tests/Type/DateTest.php b/tests/Type/DateTest.php index 909c7701..f8e9b9e8 100644 --- a/tests/Type/DateTest.php +++ b/tests/Type/DateTest.php @@ -191,7 +191,7 @@ public function testValueException(): void $this->expectException(Exception::class); $this->expectExceptionMessage( - 'SQLSTATE[22007]: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Conversion failed when converting date and/or time from character string.' + '[SQL Server]Conversion failed when converting date and/or time from character string.' ); $db->createCommand()->insert('date', ['Mydate1' => '0000-00-00'])->execute(); diff --git a/tests/Type/DecimalTest.php b/tests/Type/DecimalTest.php index e57d21b8..d5ade435 100644 --- a/tests/Type/DecimalTest.php +++ b/tests/Type/DecimalTest.php @@ -189,7 +189,7 @@ public function testMaxValueException(): void $this->expectException(Exception::class); $this->expectExceptionMessage( - "SQLSTATE[22003]: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]The number '199999999999999997748809823456034029570' is out of the range for numeric representation (maximum precision 38)." + "[SQL Server]The number '199999999999999997748809823456034029570' is out of the range for numeric representation (maximum precision 38)." ); $command->insert( @@ -266,7 +266,7 @@ public function testMinValueException(): void $this->expectException(Exception::class); $this->expectExceptionMessage( - "SQLSTATE[22003]: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]The number '199999999999999997748809823456034029570' is out of the range for numeric representation (maximum precision 38)." + "[SQL Server]The number '199999999999999997748809823456034029570' is out of the range for numeric representation (maximum precision 38)." ); $command->insert( diff --git a/tests/Type/FloatTest.php b/tests/Type/FloatTest.php index 23214118..d9653fca 100644 --- a/tests/Type/FloatTest.php +++ b/tests/Type/FloatTest.php @@ -186,7 +186,7 @@ public function testMaxValueException(): void $this->expectException(Exception::class); $this->expectExceptionMessage( - "SQLSTATE[22003]: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]The floating point value '1.80E+308' is out of the range of computer representation (8 bytes)." + "[SQL Server]The floating point value '1.80E+308' is out of the range of computer representation (8 bytes)." ); $command->insert('float', ['Myfloat1' => new Expression('1.80E+308')])->execute(); @@ -256,7 +256,7 @@ public function testMinValueException(): void $this->expectException(Exception::class); $this->expectExceptionMessage( - "SQLSTATE[22003]: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]The floating point value '1.80E+308' is out of the range of computer representation (8 bytes)." + "[SQL Server]The floating point value '1.80E+308' is out of the range of computer representation (8 bytes)." ); $command->insert('float', ['Myfloat1' => new Expression('-1.80E+308')])->execute(); diff --git a/tests/Type/IntTest.php b/tests/Type/IntTest.php index 6c33e2b9..9444cebf 100644 --- a/tests/Type/IntTest.php +++ b/tests/Type/IntTest.php @@ -182,7 +182,7 @@ public function testMaxValueException(): void $this->expectException(Exception::class); $this->expectExceptionMessage( - 'SQLSTATE[22003]: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Arithmetic overflow' + '[SQL Server]Arithmetic overflow' ); $command->insert('int', ['Myint1' => 2_147_483_648])->execute(); @@ -252,7 +252,7 @@ public function testMinValueException(): void $this->expectException(Exception::class); $this->expectExceptionMessage( - 'SQLSTATE[22003]: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Arithmetic overflow' + '[SQL Server]Arithmetic overflow' ); $command->insert('int', ['Myint1' => -2_147_483_649])->execute(); diff --git a/tests/Type/MoneyTest.php b/tests/Type/MoneyTest.php index 275eccc4..b7cee0ad 100644 --- a/tests/Type/MoneyTest.php +++ b/tests/Type/MoneyTest.php @@ -182,7 +182,7 @@ public function testMaxValueException(): void $this->expectException(Exception::class); $this->expectExceptionMessage( - 'SQLSTATE[22003]: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Arithmetic overflow error converting expression to data type money.' + '[SQL Server]Arithmetic overflow error converting expression to data type money.' ); $command->insert('money', ['Mymoney1' => '922337203685478.5808'])->execute(); @@ -252,7 +252,7 @@ public function testMinValueException(): void $this->expectException(Exception::class); $this->expectExceptionMessage( - 'SQLSTATE[22003]: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Arithmetic overflow error converting expression to data type money.' + '[SQL Server]Arithmetic overflow error converting expression to data type money.' ); $command->insert('money', ['Mymoney1' => '-922337203685480.5808'])->execute(); diff --git a/tests/Type/NumericTest.php b/tests/Type/NumericTest.php index add59114..073a1f88 100644 --- a/tests/Type/NumericTest.php +++ b/tests/Type/NumericTest.php @@ -245,7 +245,7 @@ public function testMinValueException(): void $this->expectException(Exception::class); $this->expectExceptionMessage( - "SQLSTATE[22003]: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]The number '199999999999999997748809823456034029570' is out of the range for numeric representation (maximum precision 38)." + "[SQL Server]The number '199999999999999997748809823456034029570' is out of the range for numeric representation (maximum precision 38)." ); $command->insert( diff --git a/tests/Type/RealTest.php b/tests/Type/RealTest.php index 1c6bcd55..62bfe4f6 100644 --- a/tests/Type/RealTest.php +++ b/tests/Type/RealTest.php @@ -183,7 +183,7 @@ public function testMaxValueException(): void $this->expectException(Exception::class); $this->expectExceptionMessage( - 'SQLSTATE[22003]: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Arithmetic overflow error for type real' + '[SQL Server]Arithmetic overflow error for type real' ); $command->insert('real', ['Myreal1' => new Expression('4.4E+38')])->execute(); @@ -253,7 +253,7 @@ public function testMinValueException(): void $this->expectException(Exception::class); $this->expectExceptionMessage( - 'SQLSTATE[22003]: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Arithmetic overflow error for type real' + '[SQL Server]Arithmetic overflow error for type real' ); $command->insert('real', ['Myreal1' => new Expression('-4.4E+38')])->execute(); diff --git a/tests/Type/SmallIntTest.php b/tests/Type/SmallIntTest.php index f001e201..f9dc0c2f 100644 --- a/tests/Type/SmallIntTest.php +++ b/tests/Type/SmallIntTest.php @@ -182,7 +182,7 @@ public function testMaxValueException(): void $this->expectException(Exception::class); $this->expectExceptionMessage( - 'SQLSTATE[22003]: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Arithmetic overflow' + '[SQL Server]Arithmetic overflow' ); $command->insert('smallint', ['Mysmallint1' => 32768])->execute(); @@ -252,7 +252,7 @@ public function testMinValueException(): void $this->expectException(Exception::class); $this->expectExceptionMessage( - 'SQLSTATE[22003]: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Arithmetic overflow' + '[SQL Server]Arithmetic overflow' ); $command->insert('smallint', ['Mysmallint1' => -32769])->execute(); diff --git a/tests/Type/SmallMoneyTest.php b/tests/Type/SmallMoneyTest.php index 02422465..8eb58d64 100644 --- a/tests/Type/SmallMoneyTest.php +++ b/tests/Type/SmallMoneyTest.php @@ -182,7 +182,7 @@ public function testMaxValueException(): void $this->expectException(Exception::class); $this->expectExceptionMessage( - 'SQLSTATE[22003]: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Arithmetic overflow error converting expression to data type smallmoney.' + '[SQL Server]Arithmetic overflow error converting expression to data type smallmoney.' ); $command->insert('smallmoney', ['Mysmallmoney1' => '214749.3647'])->execute(); @@ -252,7 +252,7 @@ public function testMinValueException(): void $this->expectException(Exception::class); $this->expectExceptionMessage( - 'SQLSTATE[22003]: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Arithmetic overflow error converting expression to data type smallmoney.' + '[SQL Server]Arithmetic overflow error converting expression to data type smallmoney.' ); $command->insert('smallmoney', ['Mysmallmoney1' => '-214749.3648'])->execute(); diff --git a/tests/Type/TinyIntTest.php b/tests/Type/TinyIntTest.php index a440388d..94cb01e0 100644 --- a/tests/Type/TinyIntTest.php +++ b/tests/Type/TinyIntTest.php @@ -197,7 +197,7 @@ public function testMaxValueException(): void $this->expectException(Exception::class); $this->expectExceptionMessage( - 'SQLSTATE[22003]: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Arithmetic overflow' + '[SQL Server]Arithmetic overflow' ); $command->insert('tinyint', ['Mytinyint1' => 256])->execute(); @@ -267,7 +267,7 @@ public function testMinValueException(): void $this->expectException(Exception::class); $this->expectExceptionMessage( - 'SQLSTATE[22003]: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Arithmetic overflow' + '[SQL Server]Arithmetic overflow' ); $command->insert('tinyint', ['Mytinyint1' => -1])->execute(); diff --git a/tests/Type/UniqueidentifierTest.php b/tests/Type/UniqueidentifierTest.php index 75a02566..30b1aebb 100644 --- a/tests/Type/UniqueidentifierTest.php +++ b/tests/Type/UniqueidentifierTest.php @@ -175,7 +175,7 @@ public function testValueException(): void $this->expectException(Exception::class); $this->expectExceptionMessage( - 'SQLSTATE[42000]: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Conversion failed when converting from a character string to uniqueidentifier.' + '[SQL Server]Conversion failed when converting from a character string to uniqueidentifier.' ); $command = $db->createCommand(); diff --git a/tests/Type/VarCharTest.php b/tests/Type/VarCharTest.php index 1cad4910..ff81fec8 100644 --- a/tests/Type/VarCharTest.php +++ b/tests/Type/VarCharTest.php @@ -191,7 +191,7 @@ public function testValueException(): void $this->expectException(Exception::class); $this->expectExceptionMessage( - '[Microsoft][ODBC Driver 18 for SQL Server][SQL Server]String or binary data would be truncated' + '[SQL Server]String or binary data would be truncated' ); $command->insert('varchar', ['Myvarchar1' => '01234567891'])->execute();