Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
S
Silex
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
common
Silex
Commits
9834f3c1
Commit
9834f3c1
authored
Jun 30, 2014
by
Fabien Potencier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed CS
parent
d7283586
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
src/Silex/Provider/DoctrineServiceProvider.php
src/Silex/Provider/DoctrineServiceProvider.php
+1
-1
tests/Silex/Tests/Provider/DoctrineServiceProviderTest.php
tests/Silex/Tests/Provider/DoctrineServiceProviderTest.php
+6
-6
No files found.
src/Silex/Provider/DoctrineServiceProvider.php
View file @
9834f3c1
...
...
@@ -86,7 +86,7 @@ class DoctrineServiceProvider implements ServiceProviderInterface
$app
[
'dbs.options.initializer'
]();
$configs
=
new
Container
();
$addLogger
=
(
null
!==
$app
[
'logger'
]
&&
class_exists
(
'Symfony\Bridge\Doctrine\Logger\DbalLogger'
)
);
$addLogger
=
null
!==
$app
[
'logger'
]
&&
class_exists
(
'Symfony\Bridge\Doctrine\Logger\DbalLogger'
);
foreach
(
$app
[
'dbs.options'
]
as
$name
=>
$options
)
{
$configs
[
$name
]
=
new
Configuration
();
if
(
$addLogger
)
{
...
...
tests/Silex/Tests/Provider/DoctrineServiceProviderTest.php
View file @
9834f3c1
...
...
@@ -85,19 +85,19 @@ class DoctrineServiceProviderTest extends \PHPUnit_Framework_TestCase
$this
->
markTestSkipped
(
'pdo_sqlite is not available'
);
}
if
(
!
class_exists
(
'Symfony\Bridge\Doctrine\Logger\DbalLogger'
)){
if
(
!
class_exists
(
'Symfony\Bridge\Doctrine\Logger\DbalLogger'
))
{
$this
->
markTestSkipped
(
'Symfony\Bridge\Doctrine\Logger\DbalLogger is not available'
);
}
$app
=
new
Application
();
$this
->
assertTrue
(
isset
(
$app
[
'logger'
]));
$this
->
assert
True
(
$app
[
'logger'
]
==
null
);
$this
->
assert
Null
(
$app
[
'logger'
]
);
$app
->
register
(
new
DoctrineServiceProvider
(),
array
(
'dbs.options'
=>
array
(
'sqlite1'
=>
array
(
'driver'
=>
'pdo_sqlite'
,
'memory'
=>
true
)
)
'dbs.options'
=>
array
(
'sqlite1'
=>
array
(
'driver'
=>
'pdo_sqlite'
,
'memory'
=>
true
),
),
));
$this
->
assertEquals
(
22
,
$app
[
'db'
]
->
fetchColumn
(
'SELECT 22'
));
$this
->
assert
True
(
$app
[
'db'
]
->
getConfiguration
()
->
getSQLLogger
()
==
null
);
$this
->
assert
Null
(
$app
[
'db'
]
->
getConfiguration
()
->
getSQLLogger
()
);
}
}
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