diff options
Diffstat (limited to 'tests/lib/appframework/utility/SimpleContainerTest.php')
-rw-r--r-- | tests/lib/appframework/utility/SimpleContainerTest.php | 13 |
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 |