summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-07-24 13:11:32 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-07-24 13:11:32 +0200
commit1f8ee61006a7b3dcc740cb16e5d826fa7c1646c6 (patch)
tree99b20a3014691fb114ca92054550a5f1f2d70a8f /tests
parentf558b3071fd327ed46f7e6cc3068f261572df453 (diff)
parenta4e39392047c5c49042a0666296efb276c0f88e9 (diff)
downloadnextcloud-server-1f8ee61006a7b3dcc740cb16e5d826fa7c1646c6.tar.gz
nextcloud-server-1f8ee61006a7b3dcc740cb16e5d826fa7c1646c6.zip
Merge pull request #17755 from owncloud/alias-container-alive
Add registerAlias method to shortcut interface registration #17714
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/appframework/utility/SimpleContainerTest.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/lib/appframework/utility/SimpleContainerTest.php b/tests/lib/appframework/utility/SimpleContainerTest.php
index c5c522d911f..09857808b9f 100644
--- a/tests/lib/appframework/utility/SimpleContainerTest.php
+++ b/tests/lib/appframework/utility/SimpleContainerTest.php
@@ -153,6 +153,19 @@ class SimpleContainerTest extends \Test\TestCase {
$this->assertEquals('abc', $object->test);
}
+ public function testRegisterAliasParamter() {
+ $this->container->registerParameter('test', 'abc');
+ $this->container->registerAlias('test1', 'test');
+ $this->assertEquals('abc', $this->container->query('test1'));
+ }
+
+ public function testRegisterAliasService() {
+ $this->container->registerService('test', function() {
+ return 'abc';
+ });
+ $this->container->registerAlias('test1', 'test');
+ $this->assertEquals('abc', $this->container->query('test1'));
+ }
/**
* @expectedException \OCP\AppFramework\QueryException