]> source.dussan.org Git - nextcloud-server.git/commitdiff
Add 'OCP\Files\IMimeTypeDetector' to DI container
authorRoeland Jago Douma <rullzer@owncloud.com>
Thu, 7 Jan 2016 12:20:43 +0000 (13:20 +0100)
committerRoeland Jago Douma <rullzer@owncloud.com>
Thu, 7 Jan 2016 12:20:43 +0000 (13:20 +0100)
* Added test to server container as well

lib/private/appframework/dependencyinjection/dicontainer.php
tests/lib/server.php

index 88ffc1c6f98a6d733b07a4eccf59f2a4d60d8522..69476d84c9bb0263e4ba104fd71befd06465610e 100644 (file)
@@ -165,6 +165,10 @@ class DIContainer extends SimpleContainer implements IAppContainer {
                $this->registerAlias('OCP\\AppFramework\\Utility\\IControllerMethodReflector', 'OC\AppFramework\Utility\ControllerMethodReflector');
                $this->registerAlias('ControllerMethodReflector', 'OCP\\AppFramework\\Utility\\IControllerMethodReflector');
 
+               $this->registerService('OCP\\Files\\IMimeTypeDetector', function($c) {
+                       return $this->getServer()->getMimeTypeDetector();
+               });
+
                $this->registerService('OCP\\INavigationManager', function($c) {
                        return $this->getServer()->getNavigationManager();
                });
index e2670061e8d67c588749d315516fb88668574e3b..44e1aac5cce2f3284a9e2dce6389bad1deebc64b 100644 (file)
@@ -94,6 +94,8 @@ class Server extends \Test\TestCase {
                        ['HttpClientService', '\OCP\Http\Client\IClientService'],
 
                        ['IniWrapper', '\bantu\IniGetWrapper\IniGetWrapper'],
+                       ['MimeTypeDetector', '\OCP\Files\IMimeTypeDetector'],
+                       ['MimeTypeDetector', '\OC\Files\Type\Detection'],
 
                        ['JobList', '\OC\BackgroundJob\JobList'],
                        ['JobList', '\OCP\BackgroundJob\IJobList'],