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
68200369
Unverified
Commit
68200369
authored
May 21, 2019
by
Sergei Morozov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed the assertion which doesn't work with a user-provided PDO connection
parent
06d1d8c3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
Connection.php
lib/Doctrine/DBAL/Connection.php
+0
-1
ConnectionTest.php
tests/Doctrine/Tests/DBAL/Functional/ConnectionTest.php
+13
-0
No files found.
lib/Doctrine/DBAL/Connection.php
View file @
68200369
...
@@ -1429,7 +1429,6 @@ class Connection implements DriverConnection
...
@@ -1429,7 +1429,6 @@ class Connection implements DriverConnection
public
function
getWrappedConnection
()
public
function
getWrappedConnection
()
{
{
$this
->
connect
();
$this
->
connect
();
assert
(
$this
->
_conn
instanceof
DriverConnection
);
return
$this
->
_conn
;
return
$this
->
_conn
;
}
}
...
...
tests/Doctrine/Tests/DBAL/Functional/ConnectionTest.php
View file @
68200369
...
@@ -12,6 +12,7 @@ use Doctrine\DBAL\Types\Types;
...
@@ -12,6 +12,7 @@ use Doctrine\DBAL\Types\Types;
use
Doctrine\Tests\DbalFunctionalTestCase
;
use
Doctrine\Tests\DbalFunctionalTestCase
;
use
Error
;
use
Error
;
use
Exception
;
use
Exception
;
use
PDO
;
use
RuntimeException
;
use
RuntimeException
;
use
Throwable
;
use
Throwable
;
use
function
in_array
;
use
function
in_array
;
...
@@ -311,4 +312,16 @@ class ConnectionTest extends DbalFunctionalTestCase
...
@@ -311,4 +312,16 @@ class ConnectionTest extends DbalFunctionalTestCase
$connection
->
close
();
$connection
->
close
();
}
}
/**
* @requires extension pdo_sqlite
*/
public
function
testUserProvidedPDOConnection
()
:
void
{
self
::
assertTrue
(
DriverManager
::
getConnection
([
'pdo'
=>
new
PDO
(
'sqlite::memory:'
),
])
->
ping
()
);
}
}
}
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