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
1a7faa92
Unverified
Commit
1a7faa92
authored
Jun 19, 2020
by
Sergei Morozov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clarify the specific returned driver connection type
parent
ad12b393
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
6 deletions
+15
-6
DriverTest.php
...ine/Tests/DBAL/Functional/Driver/PDOSqlsrv/DriverTest.php
+2
-2
DBAL630Test.php
tests/Doctrine/Tests/DBAL/Functional/Ticket/DBAL630Test.php
+13
-4
No files found.
tests/Doctrine/Tests/DBAL/Functional/Driver/PDOSqlsrv/DriverTest.php
View file @
1a7faa92
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
namespace
Doctrine\Tests\DBAL\Functional\Driver\PDOSqlsrv
;
namespace
Doctrine\Tests\DBAL\Functional\Driver\PDOSqlsrv
;
use
Doctrine\DBAL\Driver
as
DriverInterface
;
use
Doctrine\DBAL\Driver
as
DriverInterface
;
use
Doctrine\DBAL\Driver\Connection
;
use
Doctrine\DBAL\Driver\
PDO
Connection
;
use
Doctrine\DBAL\Driver\PDOSqlsrv\Driver
;
use
Doctrine\DBAL\Driver\PDOSqlsrv\Driver
;
use
Doctrine\Tests\DBAL\Functional\Driver\AbstractDriverTest
;
use
Doctrine\Tests\DBAL\Functional\Driver\AbstractDriverTest
;
use
Doctrine\Tests\TestUtil
;
use
Doctrine\Tests\TestUtil
;
...
@@ -40,7 +40,7 @@ class DriverTest extends AbstractDriverTest
...
@@ -40,7 +40,7 @@ class DriverTest extends AbstractDriverTest
/**
/**
* @param int[]|string[] $driverOptions
* @param int[]|string[] $driverOptions
*/
*/
pr
otected
function
getConnection
(
array
$driverOptions
)
:
Connection
pr
ivate
function
getConnection
(
array
$driverOptions
)
:
PDO
Connection
{
{
$params
=
TestUtil
::
getConnectionParams
();
$params
=
TestUtil
::
getConnectionParams
();
...
...
tests/Doctrine/Tests/DBAL/Functional/Ticket/DBAL630Test.php
View file @
1a7faa92
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
namespace
Doctrine\Tests\DBAL\Functional\Ticket
;
namespace
Doctrine\Tests\DBAL\Functional\Ticket
;
use
Doctrine\DBAL\DBALException
;
use
Doctrine\DBAL\DBALException
;
use
Doctrine\DBAL\Driver\PDOConnection
;
use
Doctrine\DBAL\ParameterType
;
use
Doctrine\DBAL\ParameterType
;
use
Doctrine\Tests\DbalFunctionalTestCase
;
use
Doctrine\Tests\DbalFunctionalTestCase
;
use
PDO
;
use
PDO
;
...
@@ -38,7 +39,7 @@ class DBAL630Test extends DbalFunctionalTestCase
...
@@ -38,7 +39,7 @@ class DBAL630Test extends DbalFunctionalTestCase
protected
function
tearDown
()
:
void
protected
function
tearDown
()
:
void
{
{
if
(
$this
->
running
)
{
if
(
$this
->
running
)
{
$this
->
connection
->
getWrappedConnection
()
->
setAttribute
(
PDO
::
ATTR_EMULATE_PREPARES
,
false
);
$this
->
getWrappedConnection
()
->
setAttribute
(
PDO
::
ATTR_EMULATE_PREPARES
,
false
);
}
}
parent
::
tearDown
();
parent
::
tearDown
();
...
@@ -72,7 +73,7 @@ class DBAL630Test extends DbalFunctionalTestCase
...
@@ -72,7 +73,7 @@ class DBAL630Test extends DbalFunctionalTestCase
public
function
testBooleanConversionBoolParamEmulatedPrepares
()
:
void
public
function
testBooleanConversionBoolParamEmulatedPrepares
()
:
void
{
{
$this
->
connection
->
getWrappedConnection
()
->
setAttribute
(
PDO
::
ATTR_EMULATE_PREPARES
,
true
);
$this
->
getWrappedConnection
()
->
setAttribute
(
PDO
::
ATTR_EMULATE_PREPARES
,
true
);
$platform
=
$this
->
connection
->
getDatabasePlatform
();
$platform
=
$this
->
connection
->
getDatabasePlatform
();
...
@@ -96,7 +97,7 @@ class DBAL630Test extends DbalFunctionalTestCase
...
@@ -96,7 +97,7 @@ class DBAL630Test extends DbalFunctionalTestCase
?
bool
$statementValue
,
?
bool
$statementValue
,
?
bool
$databaseConvertedValue
?
bool
$databaseConvertedValue
)
:
void
{
)
:
void
{
$this
->
connection
->
getWrappedConnection
()
->
setAttribute
(
PDO
::
ATTR_EMULATE_PREPARES
,
true
);
$this
->
getWrappedConnection
()
->
setAttribute
(
PDO
::
ATTR_EMULATE_PREPARES
,
true
);
$platform
=
$this
->
connection
->
getDatabasePlatform
();
$platform
=
$this
->
connection
->
getDatabasePlatform
();
...
@@ -120,7 +121,7 @@ class DBAL630Test extends DbalFunctionalTestCase
...
@@ -120,7 +121,7 @@ class DBAL630Test extends DbalFunctionalTestCase
?
bool
$statementValue
,
?
bool
$statementValue
,
bool
$databaseConvertedValue
bool
$databaseConvertedValue
)
:
void
{
)
:
void
{
$this
->
connection
->
getWrappedConnection
()
->
setAttribute
(
PDO
::
ATTR_EMULATE_PREPARES
,
true
);
$this
->
getWrappedConnection
()
->
setAttribute
(
PDO
::
ATTR_EMULATE_PREPARES
,
true
);
$platform
=
$this
->
connection
->
getDatabasePlatform
();
$platform
=
$this
->
connection
->
getDatabasePlatform
();
...
@@ -170,4 +171,12 @@ class DBAL630Test extends DbalFunctionalTestCase
...
@@ -170,4 +171,12 @@ class DBAL630Test extends DbalFunctionalTestCase
[
null
,
null
],
[
null
,
null
],
];
];
}
}
private
function
getWrappedConnection
()
:
PDOConnection
{
$connection
=
$this
->
connection
->
getWrappedConnection
();
self
::
assertInstanceOf
(
PDOConnection
::
class
,
$connection
);
return
$connection
;
}
}
}
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