mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-02 21:41:19 +08:00
Raise version min PHP 7.3.
This commit is contained in:
@ -55,7 +55,7 @@ class CommandTest extends \yiiunit\framework\db\CommandTest
|
||||
$command = $db->createCommand($sql);
|
||||
$intCol = 123;
|
||||
$charCol = 'abc';
|
||||
$floatCol = 1.23;
|
||||
$floatCol = 1.230;
|
||||
$blobCol = "\x10\x11\x12";
|
||||
$numericCol = '1.23';
|
||||
$boolCol = false;
|
||||
@ -69,9 +69,10 @@ class CommandTest extends \yiiunit\framework\db\CommandTest
|
||||
|
||||
$sql = 'SELECT int_col, char_col, float_col, CONVERT([nvarchar], blob_col) AS blob_col, numeric_col FROM type';
|
||||
$row = $db->createCommand($sql)->queryOne();
|
||||
|
||||
$this->assertEquals($intCol, $row['int_col']);
|
||||
$this->assertEquals($charCol, trim($row['char_col']));
|
||||
$this->assertEquals($floatCol, $row['float_col']);
|
||||
$this->assertEquals($floatCol, (float) $row['float_col']);
|
||||
$this->assertEquals($blobCol, $row['blob_col']);
|
||||
$this->assertEquals($numericCol, $row['numeric_col']);
|
||||
|
||||
@ -113,7 +114,7 @@ class CommandTest extends \yiiunit\framework\db\CommandTest
|
||||
|
||||
$this->assertEmpty($schema->getTableDefaultValues($tableName, true));
|
||||
$db->createCommand()->addDefaultValue($name, $tableName, 'int1', 41)->execute();
|
||||
$this->assertRegExp('/^.*41.*$/', $schema->getTableDefaultValues($tableName, true)[0]->value);
|
||||
$this->assertMatchesRegularExpression('/^.*41.*$/', $schema->getTableDefaultValues($tableName, true)[0]->value);
|
||||
|
||||
$db->createCommand()->dropDefaultValue($name, $tableName)->execute();
|
||||
$this->assertEmpty($schema->getTableDefaultValues($tableName, true));
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
* @license https://www.yiiframework.com/license/
|
||||
*/
|
||||
|
||||
namespace yiiunit\framework\db\mssql\Type;
|
||||
namespace yiiunit\framework\db\mssql\type;
|
||||
|
||||
use yii\db\Query;
|
||||
use yiiunit\framework\db\DatabaseTestCase;
|
||||
|
||||
Reference in New Issue
Block a user