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
02e6841c
Commit
02e6841c
authored
Feb 09, 2017
by
Steve Müller
Committed by
Marco Pivetta
Feb 09, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix result cache and PDO connection test on pdo_sqlsrv
parent
9d633dad
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
11 deletions
+17
-11
PDOConnectionTest.php
...ctrine/Tests/DBAL/Functional/Driver/PDOConnectionTest.php
+4
-0
ResultCacheTest.php
tests/Doctrine/Tests/DBAL/Functional/ResultCacheTest.php
+13
-11
No files found.
tests/Doctrine/Tests/DBAL/Functional/Driver/PDOConnectionTest.php
View file @
02e6841c
...
@@ -64,6 +64,10 @@ class PDOConnectionTest extends DbalFunctionalTestCase
...
@@ -64,6 +64,10 @@ class PDOConnectionTest extends DbalFunctionalTestCase
*/
*/
public
function
testThrowsWrappedExceptionOnPrepare
()
public
function
testThrowsWrappedExceptionOnPrepare
()
{
{
if
(
$this
->
_conn
->
getDriver
()
->
getName
()
===
'pdo_sqlsrv'
)
{
$this
->
markTestSkipped
(
'pdo_sqlsrv does not allow setting PDO::ATTR_EMULATE_PREPARES at connection level.'
);
}
// Emulated prepared statements have to be disabled for this test
// Emulated prepared statements have to be disabled for this test
// so that PDO actually communicates with the database server to check the query.
// so that PDO actually communicates with the database server to check the query.
$this
->
driverConnection
->
setAttribute
(
\PDO
::
ATTR_EMULATE_PREPARES
,
false
);
$this
->
driverConnection
->
setAttribute
(
\PDO
::
ATTR_EMULATE_PREPARES
,
false
);
...
...
tests/Doctrine/Tests/DBAL/Functional/ResultCacheTest.php
View file @
02e6841c
...
@@ -18,8 +18,6 @@ class ResultCacheTest extends \Doctrine\Tests\DbalFunctionalTestCase
...
@@ -18,8 +18,6 @@ class ResultCacheTest extends \Doctrine\Tests\DbalFunctionalTestCase
{
{
parent
::
setUp
();
parent
::
setUp
();
try
{
/* @var $sm \Doctrine\DBAL\Schema\AbstractSchemaManager */
$table
=
new
\Doctrine\DBAL\Schema\Table
(
"caching"
);
$table
=
new
\Doctrine\DBAL\Schema\Table
(
"caching"
);
$table
->
addColumn
(
'test_int'
,
'integer'
);
$table
->
addColumn
(
'test_int'
,
'integer'
);
$table
->
addColumn
(
'test_string'
,
'string'
,
array
(
'notnull'
=>
false
));
$table
->
addColumn
(
'test_string'
,
'string'
,
array
(
'notnull'
=>
false
));
...
@@ -27,10 +25,7 @@ class ResultCacheTest extends \Doctrine\Tests\DbalFunctionalTestCase
...
@@ -27,10 +25,7 @@ class ResultCacheTest extends \Doctrine\Tests\DbalFunctionalTestCase
$sm
=
$this
->
_conn
->
getSchemaManager
();
$sm
=
$this
->
_conn
->
getSchemaManager
();
$sm
->
createTable
(
$table
);
$sm
->
createTable
(
$table
);
}
catch
(
\Exception
$e
)
{
}
$this
->
_conn
->
executeUpdate
(
'DELETE FROM caching'
);
foreach
(
$this
->
expectedResult
as
$row
)
{
foreach
(
$this
->
expectedResult
as
$row
)
{
$this
->
_conn
->
insert
(
'caching'
,
$row
);
$this
->
_conn
->
insert
(
'caching'
,
$row
);
}
}
...
@@ -42,6 +37,13 @@ class ResultCacheTest extends \Doctrine\Tests\DbalFunctionalTestCase
...
@@ -42,6 +37,13 @@ class ResultCacheTest extends \Doctrine\Tests\DbalFunctionalTestCase
$config
->
setResultCacheImpl
(
$cache
);
$config
->
setResultCacheImpl
(
$cache
);
}
}
protected
function
tearDown
()
{
$this
->
_conn
->
getSchemaManager
()
->
dropTable
(
'caching'
);
parent
::
tearDown
();
}
public
function
testCacheFetchAssoc
()
public
function
testCacheFetchAssoc
()
{
{
$this
->
assertCacheNonCacheSelectSameFetchModeAreEqual
(
$this
->
expectedResult
,
\PDO
::
FETCH_ASSOC
);
$this
->
assertCacheNonCacheSelectSameFetchModeAreEqual
(
$this
->
expectedResult
,
\PDO
::
FETCH_ASSOC
);
...
...
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