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
8a740041
Unverified
Commit
8a740041
authored
Jun 19, 2020
by
Sergei Morozov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Expect only DriverException from Result::fetch*() methods
parent
5bca2b72
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
StatementTest.php
tests/Functional/StatementTest.php
+5
-3
No files found.
tests/Functional/StatementTest.php
View file @
8a740041
...
@@ -2,13 +2,13 @@
...
@@ -2,13 +2,13 @@
namespace
Doctrine\DBAL\Tests\Functional
;
namespace
Doctrine\DBAL\Tests\Functional
;
use
Doctrine\DBAL\Driver\Exception
;
use
Doctrine\DBAL\Driver\PDOOracle\Driver
as
PDOOracleDriver
;
use
Doctrine\DBAL\Driver\PDOOracle\Driver
as
PDOOracleDriver
;
use
Doctrine\DBAL\Driver\Result
;
use
Doctrine\DBAL\Driver\Result
;
use
Doctrine\DBAL\ParameterType
;
use
Doctrine\DBAL\ParameterType
;
use
Doctrine\DBAL\Schema\Table
;
use
Doctrine\DBAL\Schema\Table
;
use
Doctrine\DBAL\Tests\FunctionalTestCase
;
use
Doctrine\DBAL\Tests\FunctionalTestCase
;
use
Doctrine\DBAL\Types\Type
;
use
Doctrine\DBAL\Types\Type
;
use
Throwable
;
use
function
base64_decode
;
use
function
base64_decode
;
use
function
stream_get_contents
;
use
function
stream_get_contents
;
...
@@ -242,8 +242,10 @@ EOF
...
@@ -242,8 +242,10 @@ EOF
$result
->
free
();
$result
->
free
();
try
{
try
{
$value
=
$fetch
(
$result
);
// some drivers will trigger a PHP error here which, if not suppressed,
}
catch
(
Throwable
$e
)
{
// would be converted to a PHPUnit exception prior to DBAL throwing its own one
$value
=
@
$fetch
(
$result
);
}
catch
(
Exception
$e
)
{
// The drivers that enforce the command sequencing internally will throw an exception
// The drivers that enforce the command sequencing internally will throw an exception
$this
->
expectNotToPerformAssertions
();
$this
->
expectNotToPerformAssertions
();
...
...
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