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
db9019eb
Commit
db9019eb
authored
May 06, 2014
by
Jeroen De Dauw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use spaces
parent
4084f97a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
23 deletions
+23
-23
DropSchemaSqlCollectorTest.php
.../Tests/DBAL/Schema/Visitor/DropSchemaSqlCollectorTest.php
+23
-23
No files found.
tests/Doctrine/Tests/DBAL/Schema/Visitor/DropSchemaSqlCollectorTest.php
View file @
db9019eb
...
...
@@ -18,8 +18,8 @@ class DropSchemaSqlCollectorTest extends \PHPUnit_Framework_TestCase
$keyConstraintTwo
=
$this
->
getStubKeyConstraint
(
'second'
);
$platform
=
$this
->
getMockBuilder
(
'Doctrine\DBAL\Platforms\AbstractPlatform'
)
->
setMethods
(
array
(
'getDropForeignKeySQL'
))
->
getMockForAbstractClass
();
->
setMethods
(
array
(
'getDropForeignKeySQL'
))
->
getMockForAbstractClass
();
$collector
=
new
DropSchemaSqlCollector
(
$platform
);
...
...
@@ -40,10 +40,10 @@ class DropSchemaSqlCollectorTest extends \PHPUnit_Framework_TestCase
$collector
->
getQueries
();
}
private
function
getTableMock
()
{
return
$this
->
getMockWithoutArguments
(
'Doctrine\DBAL\Schema\Table'
);
}
private
function
getTableMock
()
{
return
$this
->
getMockWithoutArguments
(
'Doctrine\DBAL\Schema\Table'
);
}
private
function
getMockWithoutArguments
(
$className
)
{
...
...
@@ -54,28 +54,28 @@ class DropSchemaSqlCollectorTest extends \PHPUnit_Framework_TestCase
{
$constraint
=
$this
->
getMockWithoutArguments
(
'Doctrine\DBAL\Schema\ForeignKeyConstraint'
);
$constraint
->
expects
(
$this
->
any
())
->
method
(
'getName'
)
->
will
(
$this
->
returnValue
(
$name
));
$constraint
->
expects
(
$this
->
any
())
->
method
(
'getName'
)
->
will
(
$this
->
returnValue
(
$name
));
$constraint
->
expects
(
$this
->
any
())
->
method
(
'getForeignColumns'
)
->
will
(
$this
->
returnValue
(
array
()));
$constraint
->
expects
(
$this
->
any
())
->
method
(
'getForeignColumns'
)
->
will
(
$this
->
returnValue
(
array
()));
$constraint
->
expects
(
$this
->
any
())
->
method
(
'getColumns'
)
->
will
(
$this
->
returnValue
(
array
()));
$constraint
->
expects
(
$this
->
any
())
->
method
(
'getColumns'
)
->
will
(
$this
->
returnValue
(
array
()));
return
$constraint
;
}
public
function
testGivenForeignKeyWithZeroLength_acceptForeignKeyThrowsException
()
{
$collector
=
new
DropSchemaSqlCollector
(
$this
->
getMockForAbstractClass
(
'Doctrine\DBAL\Platforms\AbstractPlatform'
)
);
public
function
testGivenForeignKeyWithZeroLength_acceptForeignKeyThrowsException
()
{
$collector
=
new
DropSchemaSqlCollector
(
$this
->
getMockForAbstractClass
(
'Doctrine\DBAL\Platforms\AbstractPlatform'
)
);
$this
->
setExpectedException
(
'Doctrine\DBAL\Schema\SchemaException'
);
$collector
->
acceptForeignKey
(
$this
->
getTableMock
(),
$this
->
getStubKeyConstraint
(
''
));
}
$this
->
setExpectedException
(
'Doctrine\DBAL\Schema\SchemaException'
);
$collector
->
acceptForeignKey
(
$this
->
getTableMock
(),
$this
->
getStubKeyConstraint
(
''
));
}
}
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