summaryrefslogtreecommitdiffstats
path: root/lib/private/appframework
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2015-07-24 13:43:50 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2015-07-25 01:59:30 +0200
commitd8673dabe37f72c4925d945ac1e225efa91440b9 (patch)
treee1c628edfafcb2595fb7174191e216af8e484de0 /lib/private/appframework
parent1f8ee61006a7b3dcc740cb16e5d826fa7c1646c6 (diff)
downloadnextcloud-server-d8673dabe37f72c4925d945ac1e225efa91440b9.tar.gz
nextcloud-server-d8673dabe37f72c4925d945ac1e225efa91440b9.zip
add test for factories
use ref for factory test use a factory for registerAlias Ensure we construct SimpleContainer Use single instance of DIContainer in routing tests
Diffstat (limited to 'lib/private/appframework')
-rw-r--r--lib/private/appframework/dependencyinjection/dicontainer.php1
-rw-r--r--lib/private/appframework/utility/simplecontainer.php2
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/appframework/dependencyinjection/dicontainer.php b/lib/private/appframework/dependencyinjection/dicontainer.php
index c7ce6545972..e38077e838f 100644
--- a/lib/private/appframework/dependencyinjection/dicontainer.php
+++ b/lib/private/appframework/dependencyinjection/dicontainer.php
@@ -57,6 +57,7 @@ class DIContainer extends SimpleContainer implements IAppContainer {
* @param string $appName the name of the app
*/
public function __construct($appName, $urlParams = array()){
+ parent::__construct();
$this['AppName'] = $appName;
$this['urlParams'] = $urlParams;
diff --git a/lib/private/appframework/utility/simplecontainer.php b/lib/private/appframework/utility/simplecontainer.php
index c1fc96d1975..efe1b0812a6 100644
--- a/lib/private/appframework/utility/simplecontainer.php
+++ b/lib/private/appframework/utility/simplecontainer.php
@@ -148,7 +148,7 @@ class SimpleContainer extends Container implements IContainer {
public function registerAlias($alias, $target) {
$this->registerService($alias, function (IContainer $container) use ($target) {
return $container->query($target);
- });
+ }, false);
}
}