Skip to content

Commit d7dcbbf

Browse files
author
Igor Chepurnoy
committed
update TestCase
1 parent f6da3a8 commit d7dcbbf

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

tests/TestCase.php

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace yii2mod\settings\tests;
44

5-
use yii\caching\ArrayCache;
65
use yii\helpers\ArrayHelper;
76
use Yii;
87

@@ -81,18 +80,18 @@ protected function destroyApplication()
8180
protected function setupTestDbData()
8281
{
8382
$db = Yii::$app->getDb();
83+
8484
// Structure :
85-
$table = 'Setting';
86-
$columns = [
85+
86+
$db->createCommand()->createTable('Setting', [
8787
'id' => 'pk',
88-
'type' => 'string',
89-
'section' => 'string',
90-
'key' => 'string',
91-
'value' => 'text',
92-
'status' => 'smallint',
93-
'createdAt' => 'integer',
94-
'updatedAt' => 'integer',
95-
];
96-
$db->createCommand()->createTable($table, $columns)->execute();
88+
'type' => 'string(10) not null',
89+
'section' => 'string not null',
90+
'key' => 'string not null',
91+
'value' => 'text not null',
92+
'status' => 'integer',
93+
'createdAt' => 'integer not null',
94+
'updatedAt' => 'integer not null',
95+
])->execute();
9796
}
9897
}

0 commit comments

Comments
 (0)