summaryrefslogtreecommitdiffstats
path: root/tests/lib/appframework/utility/SimpleContainerTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/appframework/utility/SimpleContainerTest.php')
-rw-r--r--tests/lib/appframework/utility/SimpleContainerTest.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/lib/appframework/utility/SimpleContainerTest.php b/tests/lib/appframework/utility/SimpleContainerTest.php
index c5c522d911f..05abf76889e 100644
--- a/tests/lib/appframework/utility/SimpleContainerTest.php
+++ b/tests/lib/appframework/utility/SimpleContainerTest.php
@@ -153,7 +153,6 @@ class SimpleContainerTest extends \Test\TestCase {
$this->assertEquals('abc', $object->test);
}
-
/**
* @expectedException \OCP\AppFramework\QueryException
*/
@@ -163,5 +162,12 @@ class SimpleContainerTest extends \Test\TestCase {
);
}
+ public function testRegisterFactory() {
+ $this->container->registerService('test', function() {
+ return new \StdClass();
+ }, false);
+ $this->assertNotSame(
+ $this->container->query('test'), $this->container->query('test'));
+ }
}