Mock DIContainer to not hit the database

This commit is contained in:
Thomas Müller 2015-11-19 12:27:28 +01:00
parent 3bb6dcea64
commit 7e71d8231e
1 changed files with 3 additions and 1 deletions

View 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'));
}