Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
c6201fb5
Commit
c6201fb5
authored
May 26, 2014
by
Carsten Brandt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed cubrid test case
parent
e503a364
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
QueryBuilderTest.php
tests/unit/framework/db/QueryBuilderTest.php
+3
-1
CubridQueryBuilderTest.php
tests/unit/framework/db/cubrid/CubridQueryBuilderTest.php
+4
-4
No files found.
tests/unit/framework/db/QueryBuilderTest.php
View file @
c6201fb5
...
@@ -117,6 +117,9 @@ class QueryBuilderTest extends DatabaseTestCase
...
@@ -117,6 +117,9 @@ class QueryBuilderTest extends DatabaseTestCase
public
function
testCreateTableColumnTypes
()
public
function
testCreateTableColumnTypes
()
{
{
$qb
=
$this
->
getQueryBuilder
();
$qb
=
$this
->
getQueryBuilder
();
if
(
$qb
->
db
->
getTableSchema
(
'column_type_table'
,
true
)
!==
null
)
{
$this
->
getConnection
(
false
)
->
createCommand
(
$qb
->
dropTable
(
'column_type_table'
))
->
execute
();
}
$columns
=
[];
$columns
=
[];
$i
=
0
;
$i
=
0
;
foreach
(
$this
->
columnTypes
()
as
$item
)
{
foreach
(
$this
->
columnTypes
()
as
$item
)
{
...
@@ -126,7 +129,6 @@ class QueryBuilderTest extends DatabaseTestCase
...
@@ -126,7 +129,6 @@ class QueryBuilderTest extends DatabaseTestCase
}
}
}
}
$this
->
getConnection
(
false
)
->
createCommand
(
$qb
->
createTable
(
'column_type_table'
,
$columns
))
->
execute
();
$this
->
getConnection
(
false
)
->
createCommand
(
$qb
->
createTable
(
'column_type_table'
,
$columns
))
->
execute
();
$this
->
getConnection
(
false
)
->
createCommand
(
$qb
->
dropTable
(
'column_type_table'
))
->
execute
();
}
}
public
function
conditionProvider
()
public
function
conditionProvider
()
...
...
tests/unit/framework/db/cubrid/CubridQueryBuilderTest.php
View file @
c6201fb5
...
@@ -58,16 +58,16 @@ class CubridQueryBuilderTest extends QueryBuilderTest
...
@@ -58,16 +58,16 @@ class CubridQueryBuilderTest extends QueryBuilderTest
[
Schema
::
TYPE_DECIMAL
.
'(12,4) CHECK (value > 5.6)'
,
'decimal(12,4) CHECK (value > 5.6)'
],
[
Schema
::
TYPE_DECIMAL
.
'(12,4) CHECK (value > 5.6)'
,
'decimal(12,4) CHECK (value > 5.6)'
],
[
Schema
::
TYPE_DECIMAL
.
' NOT NULL'
,
'decimal(10,0) NOT NULL'
],
[
Schema
::
TYPE_DECIMAL
.
' NOT NULL'
,
'decimal(10,0) NOT NULL'
],
[
Schema
::
TYPE_DATETIME
,
'datetime'
],
[
Schema
::
TYPE_DATETIME
,
'datetime'
],
[
Schema
::
TYPE_DATETIME
.
" CHECK
(value BETWEEN '2011-01-01' AND '2013-01-01')"
,
"datetime CHECK
(value BETWEEN '2011-01-01' AND '2013-01-01')"
],
[
Schema
::
TYPE_DATETIME
.
" CHECK
(value BETWEEN '2011-01-01' AND '2013-01-01')"
,
"datetime CHECK
(value BETWEEN '2011-01-01' AND '2013-01-01')"
],
[
Schema
::
TYPE_DATETIME
.
' NOT NULL'
,
'datetime NOT NULL'
],
[
Schema
::
TYPE_DATETIME
.
' NOT NULL'
,
'datetime NOT NULL'
],
[
Schema
::
TYPE_TIMESTAMP
,
'timestamp'
],
[
Schema
::
TYPE_TIMESTAMP
,
'timestamp'
],
[
Schema
::
TYPE_TIMESTAMP
.
" CHECK
(value BETWEEN '2011-01-01' AND '2013-01-01')"
,
"timestamp CHECK
(value BETWEEN '2011-01-01' AND '2013-01-01')"
],
[
Schema
::
TYPE_TIMESTAMP
.
" CHECK
(value BETWEEN '2011-01-01' AND '2013-01-01')"
,
"timestamp CHECK
(value BETWEEN '2011-01-01' AND '2013-01-01')"
],
[
Schema
::
TYPE_TIMESTAMP
.
' NOT NULL'
,
'timestamp NOT NULL'
],
[
Schema
::
TYPE_TIMESTAMP
.
' NOT NULL'
,
'timestamp NOT NULL'
],
[
Schema
::
TYPE_TIME
,
'time'
],
[
Schema
::
TYPE_TIME
,
'time'
],
[
Schema
::
TYPE_TIME
.
" CHECK
(value BETWEEN '12:00:00' AND '13:01:01')"
,
"time CHECK
(value BETWEEN '12:00:00' AND '13:01:01')"
],
[
Schema
::
TYPE_TIME
.
" CHECK
(value BETWEEN '12:00:00' AND '13:01:01')"
,
"time CHECK
(value BETWEEN '12:00:00' AND '13:01:01')"
],
[
Schema
::
TYPE_TIME
.
' NOT NULL'
,
'time NOT NULL'
],
[
Schema
::
TYPE_TIME
.
' NOT NULL'
,
'time NOT NULL'
],
[
Schema
::
TYPE_DATE
,
'date'
],
[
Schema
::
TYPE_DATE
,
'date'
],
[
Schema
::
TYPE_DATE
.
" CHECK
(value BETWEEN '2011-01-01' AND '2013-01-01')"
,
"date CHECK
(value BETWEEN '2011-01-01' AND '2013-01-01')"
],
[
Schema
::
TYPE_DATE
.
" CHECK
(value BETWEEN '2011-01-01' AND '2013-01-01')"
,
"date CHECK
(value BETWEEN '2011-01-01' AND '2013-01-01')"
],
[
Schema
::
TYPE_DATE
.
' NOT NULL'
,
'date NOT NULL'
],
[
Schema
::
TYPE_DATE
.
' NOT NULL'
,
'date NOT NULL'
],
[
Schema
::
TYPE_BINARY
,
'blob'
],
[
Schema
::
TYPE_BINARY
,
'blob'
],
[
Schema
::
TYPE_BOOLEAN
,
'smallint'
],
[
Schema
::
TYPE_BOOLEAN
,
'smallint'
],
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment