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
6765c21d
Commit
6765c21d
authored
Feb 06, 2017
by
Steve Müller
Committed by
Marco Pivetta
Feb 07, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tear down active transactions in functinal test cases
parent
cc39799b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
2 deletions
+15
-2
PortabilityTest.php
tests/Doctrine/Tests/DBAL/Functional/PortabilityTest.php
+2
-0
TemporaryTableTest.php
tests/Doctrine/Tests/DBAL/Functional/TemporaryTableTest.php
+3
-1
DBAL630Test.php
tests/Doctrine/Tests/DBAL/Functional/Ticket/DBAL630Test.php
+2
-0
DbalFunctionalTestCase.php
tests/Doctrine/Tests/DbalFunctionalTestCase.php
+8
-1
No files found.
tests/Doctrine/Tests/DBAL/Functional/PortabilityTest.php
View file @
6765c21d
...
@@ -21,6 +21,8 @@ class PortabilityTest extends \Doctrine\Tests\DbalFunctionalTestCase
...
@@ -21,6 +21,8 @@ class PortabilityTest extends \Doctrine\Tests\DbalFunctionalTestCase
if
(
$this
->
portableConnection
)
{
if
(
$this
->
portableConnection
)
{
$this
->
portableConnection
->
close
();
$this
->
portableConnection
->
close
();
}
}
parent
::
tearDown
();
}
}
/**
/**
...
...
tests/Doctrine/Tests/DBAL/Functional/TemporaryTableTest.php
View file @
6765c21d
...
@@ -25,6 +25,8 @@ class TemporaryTableTest extends \Doctrine\Tests\DbalFunctionalTestCase
...
@@ -25,6 +25,8 @@ class TemporaryTableTest extends \Doctrine\Tests\DbalFunctionalTestCase
$this
->
_conn
->
exec
(
$this
->
_conn
->
getDatabasePlatform
()
->
getDropTemporaryTableSQL
(
$tempTable
));
$this
->
_conn
->
exec
(
$this
->
_conn
->
getDatabasePlatform
()
->
getDropTemporaryTableSQL
(
$tempTable
));
}
catch
(
\Exception
$e
)
{
}
}
catch
(
\Exception
$e
)
{
}
}
}
parent
::
tearDown
();
}
}
/**
/**
...
@@ -108,4 +110,4 @@ class TemporaryTableTest extends \Doctrine\Tests\DbalFunctionalTestCase
...
@@ -108,4 +110,4 @@ class TemporaryTableTest extends \Doctrine\Tests\DbalFunctionalTestCase
$rows
=
$this
->
_conn
->
fetchAll
(
'SELECT * FROM nontemporary'
);
$rows
=
$this
->
_conn
->
fetchAll
(
'SELECT * FROM nontemporary'
);
$this
->
assertEquals
(
array
(),
$rows
,
"In an event of an error this result has one row, because of an implicit commit."
);
$this
->
assertEquals
(
array
(),
$rows
,
"In an event of an error this result has one row, because of an implicit commit."
);
}
}
}
}
\ No newline at end of file
tests/Doctrine/Tests/DBAL/Functional/Ticket/DBAL630Test.php
View file @
6765c21d
...
@@ -41,6 +41,8 @@ class DBAL630Test extends \Doctrine\Tests\DbalFunctionalTestCase
...
@@ -41,6 +41,8 @@ class DBAL630Test extends \Doctrine\Tests\DbalFunctionalTestCase
$this
->
_conn
->
getWrappedConnection
()
->
setAttribute
(
PDO
::
PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT
,
false
);
$this
->
_conn
->
getWrappedConnection
()
->
setAttribute
(
PDO
::
PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT
,
false
);
}
}
}
}
parent
::
tearDown
();
}
}
public
function
testBooleanConversionSqlLiteral
()
public
function
testBooleanConversionSqlLiteral
()
...
...
tests/Doctrine/Tests/DbalFunctionalTestCase.php
View file @
6765c21d
...
@@ -40,7 +40,14 @@ class DbalFunctionalTestCase extends DbalTestCase
...
@@ -40,7 +40,14 @@ class DbalFunctionalTestCase extends DbalTestCase
$this
->
_conn
->
getConfiguration
()
->
setSQLLogger
(
$this
->
_sqlLoggerStack
);
$this
->
_conn
->
getConfiguration
()
->
setSQLLogger
(
$this
->
_sqlLoggerStack
);
}
}
protected
function
onNotSuccessfulTest
(
\Exception
$e
)
protected
function
tearDown
()
{
while
(
$this
->
_conn
->
isTransactionActive
())
{
$this
->
_conn
->
rollBack
();
}
}
protected
function
onNotSuccessfulTest
(
$e
)
{
{
if
(
$e
instanceof
\PHPUnit_Framework_AssertionFailedError
)
{
if
(
$e
instanceof
\PHPUnit_Framework_AssertionFailedError
)
{
throw
$e
;
throw
$e
;
...
...
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