]> source.dussan.org Git - nextcloud-server.git/commitdiff
Mock DIContainer to not hit the database
authorThomas Müller <thomas.mueller@tmit.eu>
Thu, 19 Nov 2015 11:27:28 +0000 (12:27 +0100)
committerThomas Müller <thomas.mueller@tmit.eu>
Mon, 30 Nov 2015 09:55:05 +0000 (10:55 +0100)
tests/lib/appframework/dependencyinjection/DIContainerTest.php

index 0cbdddbb2051e2030d5eaedffda3dd642691be79..fc15b5a44ee56e8ece359802b5d3f0da53c8f8d7 100644 (file)
@@ -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'));
        }