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
96ddf9e8
Commit
96ddf9e8
authored
Apr 30, 2020
by
Guilherme Blanco
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added tests. Fixed underscore usage in new classes for methods and properties
parent
de1f02b6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
2 deletions
+17
-2
UniqueConstraint.php
src/Schema/UniqueConstraint.php
+2
-2
AbstractPlatformTestCase.php
tests/Platforms/AbstractPlatformTestCase.php
+10
-0
SqlitePlatformTest.php
tests/Platforms/SqlitePlatformTest.php
+5
-0
No files found.
src/Schema/UniqueConstraint.php
View file @
96ddf9e8
...
...
@@ -48,7 +48,7 @@ class UniqueConstraint extends AbstractAsset implements Constraint
$this
->
options
=
$options
;
foreach
(
$columns
as
$column
)
{
$this
->
_
addColumn
(
$column
);
$this
->
addColumn
(
$column
);
}
foreach
(
$flags
as
$flag
)
{
...
...
@@ -167,7 +167,7 @@ class UniqueConstraint extends AbstractAsset implements Constraint
/**
* @return void
*/
protected
function
_addColumn
(
string
$column
)
protected
function
addColumn
(
string
$column
)
:
void
{
$this
->
columns
[
$column
]
=
new
Identifier
(
$column
);
}
...
...
tests/Platforms/AbstractPlatformTestCase.php
View file @
96ddf9e8
...
...
@@ -823,6 +823,16 @@ abstract class AbstractPlatformTestCase extends TestCase
self
::
assertFalse
(
$this
->
platform
->
usesSequenceEmulatedIdentityColumns
());
}
public
function
testGetSequencePrefixWithoutSchema
()
:
void
{
self
::
assertEquals
(
"foo"
,
$this
->
platform
->
getSequencePrefix
(
"foo"
));
}
public
function
testGetSequencePrefixWithSchema
()
:
void
{
self
::
assertEquals
(
"bar.foo"
,
$this
->
platform
->
getSequencePrefix
(
"foo"
,
"bar"
));
}
/**
* @group DBAL-563
*/
...
...
tests/Platforms/SqlitePlatformTest.php
View file @
96ddf9e8
...
...
@@ -824,4 +824,9 @@ class SqlitePlatformTest extends AbstractPlatformTestCase
'Column "no_collation" will use the default collation (BINARY) and "column_collation" overwrites the collation on this column'
);
}
public
function
testGetSequencePrefixWithSchema
()
:
void
{
self
::
assertEquals
(
"bar__foo"
,
$this
->
platform
->
getSequencePrefix
(
"foo"
,
"bar"
));
}
}
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