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
49df3598
Commit
49df3598
authored
Jan 02, 2013
by
Marco Pivetta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding failing test for FK generation logic
parent
63b7ef12
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletion
+16
-1
AbstractPlatformTestCase.php
...octrine/Tests/DBAL/Platforms/AbstractPlatformTestCase.php
+16
-1
No files found.
tests/Doctrine/Tests/DBAL/Platforms/AbstractPlatformTestCase.php
View file @
49df3598
...
@@ -10,7 +10,7 @@ use Doctrine\DBAL\Schema\TableDiff;
...
@@ -10,7 +10,7 @@ use Doctrine\DBAL\Schema\TableDiff;
abstract
class
AbstractPlatformTestCase
extends
\Doctrine\Tests\DbalTestCase
abstract
class
AbstractPlatformTestCase
extends
\Doctrine\Tests\DbalTestCase
{
{
/**
/**
* @var Doctrine\DBAL\Platforms\AbstractPlatform
* @var
\
Doctrine\DBAL\Platforms\AbstractPlatform
*/
*/
protected
$_platform
;
protected
$_platform
;
...
@@ -156,6 +156,21 @@ abstract class AbstractPlatformTestCase extends \Doctrine\Tests\DbalTestCase
...
@@ -156,6 +156,21 @@ abstract class AbstractPlatformTestCase extends \Doctrine\Tests\DbalTestCase
$this
->
assertEquals
(
$this
->
getGenerateConstraintForeignKeySql
(),
$sql
);
$this
->
assertEquals
(
$this
->
getGenerateConstraintForeignKeySql
(),
$sql
);
}
}
public
function
testGeneratesForeignKeySqlOnlyWhenSupportingForeignKeys
()
{
$fk
=
new
\Doctrine\DBAL\Schema\ForeignKeyConstraint
(
array
(
'fk_name'
),
'foreign'
,
array
(
'id'
),
'constraint_fk'
);
if
(
$this
->
_platform
->
supportsForeignKeyConstraints
())
{
$this
->
assertInternalType
(
'string'
,
$this
->
_platform
->
getCreateForeignKeySQL
(
$fk
,
'test'
)
);
}
else
{
$this
->
setExpectedException
(
'Doctrine\DBAL\DBALException'
);
$this
->
_platform
->
getCreateForeignKeySQL
(
$fk
,
'test'
);
}
}
protected
function
getBitAndComparisonExpressionSql
(
$value1
,
$value2
)
protected
function
getBitAndComparisonExpressionSql
(
$value1
,
$value2
)
{
{
return
'('
.
$value1
.
' & '
.
$value2
.
')'
;
return
'('
.
$value1
.
' & '
.
$value2
.
')'
;
...
...
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