Start of new tests

This commit is contained in:
Chris Harris
2016-02-22 08:39:41 -08:00
parent db5399b124
commit 13823834e2
2 changed files with 50 additions and 0 deletions

View File

@@ -103,6 +103,46 @@ class QueryBuilderTest extends DatabaseTestCase
$this->primaryKey(8)->check('value > 5'), $this->primaryKey(8)->check('value > 5'),
'int(8) NOT NULL AUTO_INCREMENT PRIMARY KEY CHECK (value > 5)' 'int(8) NOT NULL AUTO_INCREMENT PRIMARY KEY CHECK (value > 5)'
], ],
[
Schema::TYPE_PK . ' FIRST',
$this->primaryKey()->first(),
'int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST'
],
[
Schema::TYPE_PK . '(8) FIRST',
$this->primaryKey(8)->first(),
'int(8) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST'
],
[
Schema::TYPE_PK . ' AFTER (\'col_before\')',
$this->primaryKey()->after('col_before'),
'int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY AFTER (\'col_before\')'
],
[
Schema::TYPE_PK . ' AFTER (\'col_before\')',
$this->primaryKey(8)->after('col_before'),
'int(8) NOT NULL AUTO_INCREMENT PRIMARY KEY AFTER (\'col_before\')'
],
[
Schema::TYPE_PK . ' FIRST',
$this->primaryKey()->first()->after('col_before'),
'int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY AFTER (\'col_before\')'
],
[
Schema::TYPE_PK . '(8) FIRST',
$this->primaryKey(8)->first()->after('col_before'),
'int(8) NOT NULL AUTO_INCREMENT PRIMARY KEY AFTER (\'col_before\')'
],
[
Schema::TYPE_UNSIGNEDPK,
$this->unsignedPrimaryKey(),
'int(11) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY'
],
[
Schema::TYPE_UNSIGNEDPK . '(20)',
$this->primaryKey(20),
'int(20) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY'
],
[ [
Schema::TYPE_CHAR, Schema::TYPE_CHAR,
$this->char(), $this->char(),

View File

@@ -37,6 +37,16 @@ class SqliteQueryBuilderTest extends QueryBuilderTest
$this->primaryKey(8)->check('value > 5'), $this->primaryKey(8)->check('value > 5'),
'integer PRIMARY KEY AUTOINCREMENT NOT NULL CHECK (value > 5)' 'integer PRIMARY KEY AUTOINCREMENT NOT NULL CHECK (value > 5)'
], ],
[
Schema::TYPE_PK,
$this->primaryKey()->first()->after('col_before'),
'int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY'
],
[
Schema::TYPE_PK . '(8)',
$this->primaryKey(8)->first()->after('col_before'),
'int(8) NOT NULL AUTO_INCREMENT PRIMARY KEY'
],
[ [
Schema::TYPE_CHAR, Schema::TYPE_CHAR,
$this->char(), $this->char(),