Commit 3871f24c authored by Jerome Macias's avatar Jerome Macias

[DoctrineServiceProvider] Fix default options was not used with tests

parent ff54c09c
......@@ -55,6 +55,7 @@ class DoctrineServiceProvider implements ServiceProviderInterface
$app['dbs.default'] = $name;
}
}
$app['dbs.options'] = $tmp;
});
$app['dbs'] = $app->share(function () use ($app) {
......
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment