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
3871f24c
Commit
3871f24c
authored
Oct 23, 2011
by
Jerome Macias
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DoctrineServiceProvider] Fix default options was not used with tests
parent
ff54c09c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
src/Silex/Provider/DoctrineServiceProvider.php
src/Silex/Provider/DoctrineServiceProvider.php
+1
-0
tests/Silex/Tests/Provider/DoctrineServiceProviderTest.php
tests/Silex/Tests/Provider/DoctrineServiceProviderTest.php
+11
-0
No files found.
src/Silex/Provider/DoctrineServiceProvider.php
View file @
3871f24c
...
...
@@ -55,6 +55,7 @@ class DoctrineServiceProvider implements ServiceProviderInterface
$app
[
'dbs.default'
]
=
$name
;
}
}
$app
[
'dbs.options'
]
=
$tmp
;
});
$app
[
'dbs'
]
=
$app
->
share
(
function
()
use
(
$app
)
{
...
...
tests/Silex/Tests/Provider/DoctrineServiceProviderTest.php
View file @
3871f24c
...
...
@@ -28,6 +28,17 @@ class DoctrineServiceProviderTest extends \PHPUnit_Framework_TestCase
}
}
public
function
testOptionsInitializer
()
{
$app
=
new
Application
();
$app
->
register
(
new
DoctrineServiceProvider
(),
array
(
'db.common.class_path'
=>
__DIR__
.
'/../../../../vendor/doctrine-common/lib'
,
'db.dbal.class_path'
=>
__DIR__
.
'/../../../../vendor/doctrine-dbal/lib'
,
));
$this
->
assertEquals
(
$app
[
'db.default_options'
],
$app
[
'db'
]
->
getParams
());
}
public
function
testSingleConnection
()
{
$app
=
new
Application
();
...
...
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