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
b0644080
Commit
b0644080
authored
Nov 26, 2013
by
Steve Müller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add connection empty insert test
parent
db4b370a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
1 deletion
+22
-1
ConnectionTest.php
tests/Doctrine/Tests/DBAL/ConnectionTest.php
+22
-1
No files found.
tests/Doctrine/Tests/DBAL/ConnectionTest.php
View file @
b0644080
...
...
@@ -8,6 +8,7 @@ use Doctrine\DBAL\Connection;
use
Doctrine\Common\EventManager
;
use
Doctrine\DBAL\Configuration
;
use
Doctrine\DBAL\Events
;
use
Doctrine\Tests\Mocks\ConnectionMock
;
use
Doctrine\Tests\Mocks\DriverConnectionMock
;
class
ConnectionTest
extends
\Doctrine\Tests\DbalTestCase
...
...
@@ -275,4 +276,24 @@ SQLSTATE[HY000]: General error: 1 near \"MUUHAAAAHAAAA\"");
$this
->
assertFalse
(
$conn
->
isTransactionActive
());
}
}
\ No newline at end of file
public
function
testEmptyInsert
()
{
$driverMock
=
$this
->
getMock
(
'Doctrine\DBAL\Driver'
);
$driverMock
->
expects
(
$this
->
any
())
->
method
(
'connect'
)
->
will
(
$this
->
returnValue
(
new
DriverConnectionMock
()));
$conn
=
$this
->
getMockBuilder
(
'Doctrine\DBAL\Connection'
)
->
setMethods
(
array
(
'executeUpdate'
))
->
setConstructorArgs
(
array
(
array
(
'platform'
=>
new
Mocks\MockPlatform
()),
$driverMock
))
->
getMock
();
$conn
->
expects
(
$this
->
once
())
->
method
(
'executeUpdate'
)
->
with
(
'INSERT INTO footable () VALUES ()'
);
$conn
->
insert
(
'footable'
,
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