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
7e65c84c
Unverified
Commit
7e65c84c
authored
Oct 16, 2017
by
Adrien Crivelli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix code style
parent
4851fc05
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
21 deletions
+21
-21
PostgreSqlSchemaManager.php
lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php
+1
-1
AbstractMySQLPlatformTestCase.php
...ne/Tests/DBAL/Platforms/AbstractMySQLPlatformTestCase.php
+6
-6
AbstractPostgreSqlPlatformTestCase.php
...sts/DBAL/Platforms/AbstractPostgreSqlPlatformTestCase.php
+3
-3
OraclePlatformTest.php
tests/Doctrine/Tests/DBAL/Platforms/OraclePlatformTest.php
+0
-11
SqlitePlatformTest.php
tests/Doctrine/Tests/DBAL/Platforms/SqlitePlatformTest.php
+11
-0
No files found.
lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php
View file @
7e65c84c
...
...
@@ -386,7 +386,7 @@ class PostgreSqlSchemaManager extends AbstractSchemaManager
case
'text'
:
case
'_varchar'
:
case
'varchar'
:
$tableColumn
[
'default'
]
=
$this
->
fixDefaultValueQuotes
(
$tableColumn
[
'default'
]);
$tableColumn
[
'default'
]
=
$this
->
fixDefaultValueQuotes
(
$tableColumn
[
'default'
]);
$fixed
=
false
;
break
;
case
'interval'
:
...
...
tests/Doctrine/Tests/DBAL/Platforms/AbstractMySQLPlatformTestCase.php
View file @
7e65c84c
...
...
@@ -473,7 +473,7 @@ abstract class AbstractMySQLPlatformTestCase extends AbstractPlatformTestCase
"ALTER TABLE mytable ADD PRIMARY KEY (foo)"
,
),
$sql
);
}
public
function
testAlterPrimaryKeyWithNewColumn
()
{
$table
=
new
Table
(
"yolo"
);
...
...
@@ -483,7 +483,7 @@ abstract class AbstractMySQLPlatformTestCase extends AbstractPlatformTestCase
$comparator
=
new
Comparator
();
$diffTable
=
clone
$table
;
$diffTable
->
addColumn
(
'pkc2'
,
'integer'
);
$diffTable
->
dropPrimaryKey
();
$diffTable
->
setPrimaryKey
(
array
(
'pkc1'
,
'pkc2'
));
...
...
@@ -495,7 +495,7 @@ abstract class AbstractMySQLPlatformTestCase extends AbstractPlatformTestCase
'ALTER TABLE yolo ADD PRIMARY KEY (pkc1, pkc2)'
,
),
$this
->
_platform
->
getAlterTableSQL
(
$comparator
->
diffTable
(
$table
,
$diffTable
))
);
);
}
public
function
testInitializesDoctrineTypeMappings
()
...
...
@@ -911,11 +911,11 @@ abstract class AbstractMySQLPlatformTestCase extends AbstractPlatformTestCase
public
function
testGetDefaultValueDeclarationSQLEscaped
()
{
// string must be escaped
$field
=
array
(
$field
=
[
'type'
=>
'string'
,
'default'
=>
'Foo\\Bar'
)
;
]
;
self
::
assert
Equals
(
" DEFAULT 'Foo
\\\\
Bar'"
,
$this
->
_platform
->
getDefaultValueDeclarationSQL
(
$field
));
self
::
assert
Same
(
" DEFAULT 'Foo
\\\\
Bar'"
,
$this
->
_platform
->
getDefaultValueDeclarationSQL
(
$field
));
}
}
tests/Doctrine/Tests/DBAL/Platforms/AbstractPostgreSqlPlatformTestCase.php
View file @
7e65c84c
...
...
@@ -980,11 +980,11 @@ abstract class AbstractPostgreSqlPlatformTestCase extends AbstractPlatformTestCa
public
function
testGetDefaultValueDeclarationSQLEscaped
()
{
// string must be escaped
$field
=
array
(
$field
=
[
'type'
=>
'string'
,
'default'
=>
'Foo\\Bar'
)
;
]
;
self
::
assert
Equals
(
" DEFAULT 'Foo
\\\\
Bar'"
,
$this
->
_platform
->
getDefaultValueDeclarationSQL
(
$field
));
self
::
assert
Same
(
" DEFAULT 'Foo
\\\\
Bar'"
,
$this
->
_platform
->
getDefaultValueDeclarationSQL
(
$field
));
}
}
tests/Doctrine/Tests/DBAL/Platforms/OraclePlatformTest.php
View file @
7e65c84c
...
...
@@ -874,15 +874,4 @@ EOD;
{
self
::
assertContains
(
"'Foo''Bar
\\\\
'"
,
$this
->
_platform
->
getListTableColumnsSQL
(
'foo_table'
,
"Foo'Bar
\\
"
),
''
,
true
);
}
public
function
testGetDefaultValueDeclarationSQLEscaped
()
{
// string must be escaped
$field
=
array
(
'type'
=>
'string'
,
'default'
=>
'Foo\\Bar'
);
self
::
assertEquals
(
" DEFAULT 'Foo
\\\\
Bar'"
,
$this
->
_platform
->
getDefaultValueDeclarationSQL
(
$field
));
}
}
tests/Doctrine/Tests/DBAL/Platforms/SqlitePlatformTest.php
View file @
7e65c84c
...
...
@@ -748,4 +748,15 @@ class SqlitePlatformTest extends AbstractPlatformTestCase
{
self
::
assertContains
(
"'Foo''Bar
\\
'"
,
$this
->
_platform
->
getListTableForeignKeysSQL
(
"Foo'Bar
\\
"
),
''
,
true
);
}
public
function
testGetDefaultValueDeclarationSQLEscaped
()
{
// string must be escaped
$field
=
[
'type'
=>
'string'
,
'default'
=>
"Foo
\\
Bar'Baz"
];
self
::
assertSame
(
" DEFAULT 'Foo
\\
Bar''Baz'"
,
$this
->
_platform
->
getDefaultValueDeclarationSQL
(
$field
));
}
}
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