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
5ca7d3ca
Commit
5ca7d3ca
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
24fb533b
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
50 additions
and
0 deletions
+50
-0
AbstractPlatformTestCase.php
...octrine/Tests/DBAL/Platforms/AbstractPlatformTestCase.php
+11
-0
MySqlPlatformTest.php
tests/Doctrine/Tests/DBAL/Platforms/MySqlPlatformTest.php
+7
-0
OraclePlatformTest.php
tests/Doctrine/Tests/DBAL/Platforms/OraclePlatformTest.php
+8
-0
PostgreSqlPlatformTest.php
.../Doctrine/Tests/DBAL/Platforms/PostgreSqlPlatformTest.php
+8
-0
SQLServerPlatformTest.php
...s/Doctrine/Tests/DBAL/Platforms/SQLServerPlatformTest.php
+8
-0
SqlitePlatformTest.php
tests/Doctrine/Tests/DBAL/Platforms/SqlitePlatformTest.php
+8
-0
No files found.
tests/Doctrine/Tests/DBAL/Platforms/AbstractPlatformTestCase.php
View file @
5ca7d3ca
...
...
@@ -442,6 +442,7 @@ abstract class AbstractPlatformTestCase extends \Doctrine\Tests\DbalTestCase
abstract
protected
function
getQuotedColumnInPrimaryKeySQL
();
abstract
protected
function
getQuotedColumnInIndexSQL
();
abstract
protected
function
getQuotedNameInIndexSQL
();
abstract
protected
function
getQuotedColumnInForeignKeySQL
();
/**
...
...
@@ -457,6 +458,16 @@ abstract class AbstractPlatformTestCase extends \Doctrine\Tests\DbalTestCase
$this
->
assertEquals
(
$this
->
getQuotedColumnInIndexSQL
(),
$sql
);
}
public
function
testQuotedNameInIndexSQL
()
{
$table
=
new
Table
(
'test'
);
$table
->
addColumn
(
'column1'
,
'string'
);
$table
->
addIndex
(
array
(
'column1'
),
'create'
);
$sql
=
$this
->
_platform
->
getCreateTableSQL
(
$table
);
$this
->
assertEquals
(
$this
->
getQuotedNameInIndexSQL
(),
$sql
);
}
/**
* @group DBAL-374
*/
...
...
tests/Doctrine/Tests/DBAL/Platforms/MySqlPlatformTest.php
View file @
5ca7d3ca
...
...
@@ -248,6 +248,13 @@ class MySqlPlatformTest extends AbstractPlatformTestCase
);
}
protected
function
getQuotedNameInIndexSQL
()
{
return
array
(
'CREATE TABLE test (column1 VARCHAR(255) NOT NULL, INDEX `create` (column1)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB'
);
}
protected
function
getQuotedColumnInForeignKeySQL
()
{
return
array
(
...
...
tests/Doctrine/Tests/DBAL/Platforms/OraclePlatformTest.php
View file @
5ca7d3ca
...
...
@@ -344,6 +344,14 @@ class OraclePlatformTest extends AbstractPlatformTestCase
);
}
protected
function
getQuotedNameInIndexSQL
()
{
return
array
(
'CREATE TABLE test (column1 VARCHAR2(255) NOT NULL)'
,
'CREATE INDEX "create" ON test (column1)'
,
);
}
protected
function
getQuotedColumnInForeignKeySQL
()
{
return
array
(
...
...
tests/Doctrine/Tests/DBAL/Platforms/PostgreSqlPlatformTest.php
View file @
5ca7d3ca
...
...
@@ -284,6 +284,14 @@ class PostgreSqlPlatformTest extends AbstractPlatformTestCase
);
}
protected
function
getQuotedNameInIndexSQL
()
{
return
array
(
'CREATE TABLE test (column1 VARCHAR(255) NOT NULL)'
,
'CREATE INDEX "create" ON test (column1)'
,
);
}
protected
function
getQuotedColumnInForeignKeySQL
()
{
return
array
(
...
...
tests/Doctrine/Tests/DBAL/Platforms/SQLServerPlatformTest.php
View file @
5ca7d3ca
...
...
@@ -353,4 +353,12 @@ class SQLServerPlatformTest extends AbstractPlatformTestCase
'ALTER TABLE mytable ALTER COLUMN name NCHAR(2) NOT NULL'
,
);
}
protected
function
getQuotedNameInIndexSQL
()
{
return
array
(
'CREATE TABLE test (column1 NVARCHAR(255) NOT NULL)'
,
'CREATE INDEX [create] ON test (column1)'
,
);
}
}
tests/Doctrine/Tests/DBAL/Platforms/SqlitePlatformTest.php
View file @
5ca7d3ca
...
...
@@ -292,6 +292,14 @@ class SqlitePlatformTest extends AbstractPlatformTestCase
);
}
protected
function
getQuotedNameInIndexSQL
()
{
return
array
(
'CREATE TABLE test (column1 VARCHAR(255) NOT NULL)'
,
'CREATE INDEX "create" ON test (column1)'
,
);
}
protected
function
getQuotedColumnInForeignKeySQL
()
{
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