Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
Tomáš Trávníček
doctrine-dbal
Commits
d77aa767
Commit
d77aa767
authored
Nov 08, 2014
by
Markus Fasselt
Committed by
Steve Müller
Jan 12, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#723 - Added tests
parent
93e91bcf
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
66 additions
and
0 deletions
+66
-0
AbstractMySQLPlatformTestCase.php
...ne/Tests/DBAL/Platforms/AbstractMySQLPlatformTestCase.php
+7
-0
AbstractPlatformTestCase.php
...octrine/Tests/DBAL/Platforms/AbstractPlatformTestCase.php
+11
-0
AbstractPostgreSqlPlatformTestCase.php
...sts/DBAL/Platforms/AbstractPostgreSqlPlatformTestCase.php
+8
-0
AbstractSQLServerPlatformTestCase.php
...ests/DBAL/Platforms/AbstractSQLServerPlatformTestCase.php
+8
-0
DB2PlatformTest.php
tests/Doctrine/Tests/DBAL/Platforms/DB2PlatformTest.php
+8
-0
OraclePlatformTest.php
tests/Doctrine/Tests/DBAL/Platforms/OraclePlatformTest.php
+8
-0
SQLAnywherePlatformTest.php
...Doctrine/Tests/DBAL/Platforms/SQLAnywherePlatformTest.php
+8
-0
SqlitePlatformTest.php
tests/Doctrine/Tests/DBAL/Platforms/SqlitePlatformTest.php
+8
-0
No files found.
tests/Doctrine/Tests/DBAL/Platforms/AbstractMySQLPlatformTestCase.php
View file @
d77aa767
...
@@ -242,6 +242,13 @@ abstract class AbstractMySQLPlatformTestCase extends AbstractPlatformTestCase
...
@@ -242,6 +242,13 @@ abstract class AbstractMySQLPlatformTestCase extends AbstractPlatformTestCase
);
);
}
}
protected
function
getQuotedNameInIndexSQL
()
{
return
array
(
'CREATE TABLE test (column1 VARCHAR(255) NOT NULL, INDEX `key` (column1)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB'
);
}
protected
function
getQuotedColumnInForeignKeySQL
()
protected
function
getQuotedColumnInForeignKeySQL
()
{
{
return
array
(
return
array
(
...
...
tests/Doctrine/Tests/DBAL/Platforms/AbstractPlatformTestCase.php
View file @
d77aa767
...
@@ -539,6 +539,7 @@ abstract class AbstractPlatformTestCase extends \Doctrine\Tests\DbalTestCase
...
@@ -539,6 +539,7 @@ abstract class AbstractPlatformTestCase extends \Doctrine\Tests\DbalTestCase
abstract
protected
function
getQuotedColumnInPrimaryKeySQL
();
abstract
protected
function
getQuotedColumnInPrimaryKeySQL
();
abstract
protected
function
getQuotedColumnInIndexSQL
();
abstract
protected
function
getQuotedColumnInIndexSQL
();
abstract
protected
function
getQuotedNameInIndexSQL
();
abstract
protected
function
getQuotedColumnInForeignKeySQL
();
abstract
protected
function
getQuotedColumnInForeignKeySQL
();
/**
/**
...
@@ -554,6 +555,16 @@ abstract class AbstractPlatformTestCase extends \Doctrine\Tests\DbalTestCase
...
@@ -554,6 +555,16 @@ abstract class AbstractPlatformTestCase extends \Doctrine\Tests\DbalTestCase
$this
->
assertEquals
(
$this
->
getQuotedColumnInIndexSQL
(),
$sql
);
$this
->
assertEquals
(
$this
->
getQuotedColumnInIndexSQL
(),
$sql
);
}
}
public
function
testQuotedNameInIndexSQL
()
{
$table
=
new
Table
(
'test'
);
$table
->
addColumn
(
'column1'
,
'string'
);
$table
->
addIndex
(
array
(
'column1'
),
'`key`'
);
$sql
=
$this
->
_platform
->
getCreateTableSQL
(
$table
);
$this
->
assertEquals
(
$this
->
getQuotedNameInIndexSQL
(),
$sql
);
}
/**
/**
* @group DBAL-374
* @group DBAL-374
*/
*/
...
...
tests/Doctrine/Tests/DBAL/Platforms/AbstractPostgreSqlPlatformTestCase.php
View file @
d77aa767
...
@@ -280,6 +280,14 @@ abstract class AbstractPostgreSqlPlatformTestCase extends AbstractPlatformTestCa
...
@@ -280,6 +280,14 @@ abstract class AbstractPostgreSqlPlatformTestCase extends AbstractPlatformTestCa
);
);
}
}
protected
function
getQuotedNameInIndexSQL
()
{
return
array
(
'CREATE TABLE test (column1 VARCHAR(255) NOT NULL)'
,
'CREATE INDEX "key" ON test (column1)'
,
);
}
protected
function
getQuotedColumnInForeignKeySQL
()
protected
function
getQuotedColumnInForeignKeySQL
()
{
{
return
array
(
return
array
(
...
...
tests/Doctrine/Tests/DBAL/Platforms/AbstractSQLServerPlatformTestCase.php
View file @
d77aa767
...
@@ -455,6 +455,14 @@ abstract class AbstractSQLServerPlatformTestCase extends AbstractPlatformTestCas
...
@@ -455,6 +455,14 @@ abstract class AbstractSQLServerPlatformTestCase extends AbstractPlatformTestCas
);
);
}
}
protected
function
getQuotedNameInIndexSQL
()
{
return
array
(
'CREATE TABLE test (column1 NVARCHAR(255) NOT NULL)'
,
'CREATE INDEX [key] ON test (column1)'
,
);
}
protected
function
getQuotedColumnInForeignKeySQL
()
protected
function
getQuotedColumnInForeignKeySQL
()
{
{
return
array
(
return
array
(
...
...
tests/Doctrine/Tests/DBAL/Platforms/DB2PlatformTest.php
View file @
d77aa767
...
@@ -86,6 +86,14 @@ class DB2PlatformTest extends AbstractPlatformTestCase
...
@@ -86,6 +86,14 @@ class DB2PlatformTest extends AbstractPlatformTestCase
);
);
}
}
protected
function
getQuotedNameInIndexSQL
()
{
return
array
(
'CREATE TABLE test (column1 VARCHAR(255) NOT NULL)'
,
'CREATE INDEX "key" ON test (column1)'
,
);
}
protected
function
getQuotedColumnInPrimaryKeySQL
()
protected
function
getQuotedColumnInPrimaryKeySQL
()
{
{
return
array
(
return
array
(
...
...
tests/Doctrine/Tests/DBAL/Platforms/OraclePlatformTest.php
View file @
d77aa767
...
@@ -344,6 +344,14 @@ class OraclePlatformTest extends AbstractPlatformTestCase
...
@@ -344,6 +344,14 @@ class OraclePlatformTest extends AbstractPlatformTestCase
);
);
}
}
protected
function
getQuotedNameInIndexSQL
()
{
return
array
(
'CREATE TABLE test (column1 VARCHAR2(255) NOT NULL)'
,
'CREATE INDEX "key" ON test (column1)'
,
);
}
protected
function
getQuotedColumnInForeignKeySQL
()
protected
function
getQuotedColumnInForeignKeySQL
()
{
{
return
array
(
return
array
(
...
...
tests/Doctrine/Tests/DBAL/Platforms/SQLAnywherePlatformTest.php
View file @
d77aa767
...
@@ -78,6 +78,14 @@ class SQLAnywherePlatformTest extends AbstractPlatformTestCase
...
@@ -78,6 +78,14 @@ class SQLAnywherePlatformTest extends AbstractPlatformTestCase
);
);
}
}
protected
function
getQuotedNameInIndexSQL
()
{
return
array
(
'CREATE TABLE test (column1 VARCHAR(255) NOT NULL)'
,
'CREATE INDEX "key" ON test (column1)'
,
);
}
protected
function
getQuotedColumnInPrimaryKeySQL
()
protected
function
getQuotedColumnInPrimaryKeySQL
()
{
{
return
array
(
return
array
(
...
...
tests/Doctrine/Tests/DBAL/Platforms/SqlitePlatformTest.php
View file @
d77aa767
...
@@ -440,6 +440,14 @@ class SqlitePlatformTest extends AbstractPlatformTestCase
...
@@ -440,6 +440,14 @@ class SqlitePlatformTest extends AbstractPlatformTestCase
);
);
}
}
protected
function
getQuotedNameInIndexSQL
()
{
return
array
(
'CREATE TABLE test (column1 VARCHAR(255) NOT NULL)'
,
'CREATE INDEX "key" ON test (column1)'
,
);
}
protected
function
getQuotedColumnInForeignKeySQL
()
protected
function
getQuotedColumnInForeignKeySQL
()
{
{
return
array
(
return
array
(
...
...
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