Skip to content

Commit

Permalink
Fix tests for 2017
Browse files Browse the repository at this point in the history
  • Loading branch information
Tigrov committed Oct 11, 2024
1 parent 178f837 commit 72883f7
Show file tree
Hide file tree
Showing 13 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion tests/Type/CharTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion tests/Type/DateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions tests/Type/DecimalTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down
4 changes: 2 additions & 2 deletions tests/Type/FloatTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions tests/Type/IntTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions tests/Type/MoneyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion tests/Type/NumericTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
4 changes: 2 additions & 2 deletions tests/Type/RealTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions tests/Type/SmallIntTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions tests/Type/SmallMoneyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions tests/Type/TinyIntTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion tests/Type/UniqueidentifierTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion tests/Type/VarCharTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 72883f7

Please sign in to comment.