diff --git a/tests/lib/appframework/dependencyinjection/DIContainerTest.php b/tests/lib/appframework/dependencyinjection/DIContainerTest.php
index 0cbdddbb2051e2030d5eaedffda3dd642691be79..fc15b5a44ee56e8ece359802b5d3f0da53c8f8d7 100644
--- a/tests/lib/appframework/dependencyinjection/DIContainerTest.php
+++ b/tests/lib/appframework/dependencyinjection/DIContainerTest.php
@@ -36,7 +36,9 @@ class DIContainerTest extends \Test\TestCase {
 
 	protected function setUp(){
 		parent::setUp();
-		$this->container = new DIContainer('name');
+		$this->container = $this->getMock('OC\AppFramework\DependencyInjection\DIContainer',
+				['isAdminUser'], ['name']
+		);
 		$this->api = $this->getMock('OC\AppFramework\Core\API', array(), array('hi'));
 	}