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
ab29feea
Commit
ab29feea
authored
Dec 25, 2011
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
...
parent
4ba05468
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
ConnectionTest.php
tests/unit/framework/db/dao/ConnectionTest.php
+7
-7
No files found.
tests/unit/framework/db/dao/ConnectionTest.php
View file @
ab29feea
...
@@ -8,7 +8,7 @@ class ConnectionTest extends \yiiunit\MysqlTestCase
...
@@ -8,7 +8,7 @@ class ConnectionTest extends \yiiunit\MysqlTestCase
{
{
function
testConstruct
()
function
testConstruct
()
{
{
$connection
=
$this
->
getConnection
();
$connection
=
$this
->
getConnection
(
false
);
$params
=
$this
->
getParam
(
'mysql'
);
$params
=
$this
->
getParam
(
'mysql'
);
$this
->
assertEquals
(
$params
[
'dsn'
],
$connection
->
dsn
);
$this
->
assertEquals
(
$params
[
'dsn'
],
$connection
->
dsn
);
...
@@ -18,7 +18,7 @@ class ConnectionTest extends \yiiunit\MysqlTestCase
...
@@ -18,7 +18,7 @@ class ConnectionTest extends \yiiunit\MysqlTestCase
function
testOpenClose
()
function
testOpenClose
()
{
{
$connection
=
$this
->
getConnection
();
$connection
=
$this
->
getConnection
(
false
);
$this
->
assertFalse
(
$connection
->
active
);
$this
->
assertFalse
(
$connection
->
active
);
$this
->
assertEquals
(
null
,
$connection
->
pdo
);
$this
->
assertEquals
(
null
,
$connection
->
pdo
);
...
@@ -38,14 +38,14 @@ class ConnectionTest extends \yiiunit\MysqlTestCase
...
@@ -38,14 +38,14 @@ class ConnectionTest extends \yiiunit\MysqlTestCase
function
testGetDriverName
()
function
testGetDriverName
()
{
{
$connection
=
$this
->
getConnection
();
$connection
=
$this
->
getConnection
(
false
);
$this
->
assertEquals
(
'mysql'
,
$connection
->
driverName
);
$this
->
assertEquals
(
'mysql'
,
$connection
->
driverName
);
$this
->
assertFalse
(
$connection
->
active
);
$this
->
assertFalse
(
$connection
->
active
);
}
}
function
testQuoteValue
()
function
testQuoteValue
()
{
{
$connection
=
$this
->
getConnection
();
$connection
=
$this
->
getConnection
(
false
);
$this
->
assertEquals
(
123
,
$connection
->
quoteValue
(
123
));
$this
->
assertEquals
(
123
,
$connection
->
quoteValue
(
123
));
$this
->
assertEquals
(
"'string'"
,
$connection
->
quoteValue
(
'string'
));
$this
->
assertEquals
(
"'string'"
,
$connection
->
quoteValue
(
'string'
));
$this
->
assertEquals
(
"'It\'s interesting'"
,
$connection
->
quoteValue
(
"It's interesting"
));
$this
->
assertEquals
(
"'It\'s interesting'"
,
$connection
->
quoteValue
(
"It's interesting"
));
...
@@ -53,7 +53,7 @@ class ConnectionTest extends \yiiunit\MysqlTestCase
...
@@ -53,7 +53,7 @@ class ConnectionTest extends \yiiunit\MysqlTestCase
function
testQuoteTableName
()
function
testQuoteTableName
()
{
{
$connection
=
$this
->
getConnection
();
$connection
=
$this
->
getConnection
(
false
);
$this
->
assertEquals
(
'`table`'
,
$connection
->
quoteTableName
(
'table'
));
$this
->
assertEquals
(
'`table`'
,
$connection
->
quoteTableName
(
'table'
));
$this
->
assertEquals
(
'`table`'
,
$connection
->
quoteTableName
(
'`table`'
));
$this
->
assertEquals
(
'`table`'
,
$connection
->
quoteTableName
(
'`table`'
));
$this
->
assertEquals
(
'`schema`.`table`'
,
$connection
->
quoteTableName
(
'schema.table'
));
$this
->
assertEquals
(
'`schema`.`table`'
,
$connection
->
quoteTableName
(
'schema.table'
));
...
@@ -62,7 +62,7 @@ class ConnectionTest extends \yiiunit\MysqlTestCase
...
@@ -62,7 +62,7 @@ class ConnectionTest extends \yiiunit\MysqlTestCase
function
testQuoteColumnName
()
function
testQuoteColumnName
()
{
{
$connection
=
$this
->
getConnection
();
$connection
=
$this
->
getConnection
(
false
);
$this
->
assertEquals
(
'`column`'
,
$connection
->
quoteColumnName
(
'column'
));
$this
->
assertEquals
(
'`column`'
,
$connection
->
quoteColumnName
(
'column'
));
$this
->
assertEquals
(
'`column`'
,
$connection
->
quoteColumnName
(
'`column`'
));
$this
->
assertEquals
(
'`column`'
,
$connection
->
quoteColumnName
(
'`column`'
));
$this
->
assertEquals
(
'`table`.`column`'
,
$connection
->
quoteColumnName
(
'table.column'
));
$this
->
assertEquals
(
'`table`.`column`'
,
$connection
->
quoteColumnName
(
'table.column'
));
...
@@ -71,7 +71,7 @@ class ConnectionTest extends \yiiunit\MysqlTestCase
...
@@ -71,7 +71,7 @@ class ConnectionTest extends \yiiunit\MysqlTestCase
function
testGetPdoType
()
function
testGetPdoType
()
{
{
$connection
=
$this
->
getConnection
();
$connection
=
$this
->
getConnection
(
false
);
$this
->
assertEquals
(
\PDO
::
PARAM_BOOL
,
$connection
->
getPdoType
(
'boolean'
));
$this
->
assertEquals
(
\PDO
::
PARAM_BOOL
,
$connection
->
getPdoType
(
'boolean'
));
$this
->
assertEquals
(
\PDO
::
PARAM_INT
,
$connection
->
getPdoType
(
'integer'
));
$this
->
assertEquals
(
\PDO
::
PARAM_INT
,
$connection
->
getPdoType
(
'integer'
));
$this
->
assertEquals
(
\PDO
::
PARAM_STR
,
$connection
->
getPdoType
(
'string'
));
$this
->
assertEquals
(
\PDO
::
PARAM_STR
,
$connection
->
getPdoType
(
'string'
));
...
...
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