diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-11-19 12:27:28 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-11-30 10:55:05 +0100 |
commit | 7e71d8231e79d2795a10ef3b3aef50e4a5999bbc (patch) | |
tree | 12ec5b7d619feed6dc0823efd52dd13651c223c8 /tests | |
parent | 3bb6dcea6438e2be46d860e41c27c4314bbdd283 (diff) | |
download | nextcloud-server-7e71d8231e79d2795a10ef3b3aef50e4a5999bbc.tar.gz nextcloud-server-7e71d8231e79d2795a10ef3b3aef50e4a5999bbc.zip |
Mock DIContainer to not hit the database
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/appframework/dependencyinjection/DIContainerTest.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/lib/appframework/dependencyinjection/DIContainerTest.php b/tests/lib/appframework/dependencyinjection/DIContainerTest.php index 0cbdddbb205..fc15b5a44ee 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')); } |