From 7e71d8231e79d2795a10ef3b3aef50e4a5999bbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Thu, 19 Nov 2015 12:27:28 +0100 Subject: [PATCH] Mock DIContainer to not hit the database --- .../lib/appframework/dependencyinjection/DIContainerTest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/lib/appframework/dependencyinjection/DIContainerTest.php b/tests/lib/appframework/dependencyinjection/DIContainerTest.php index 0cbdddbb20..fc15b5a44e 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')); }