protected function setUp() { parent::setUp(); $this->userSession = $this->getMock('\\OCP\\IUserSession'); $this->groupManager = $this->getMock('\\OCP\\IGroupManager'); $this->appConfig = $this->getAppConfig(); $this->cacheFactory = $this->getMock('\\OCP\\ICacheFactory'); $this->cache = $this->getMock('\\OCP\\ICache'); $this->cacheFactory->expects($this->any())->method('create')->with('settings')->willReturn($this->cache); $this->manager = new \OC\App\AppManager($this->userSession, $this->appConfig, $this->groupManager, $this->cacheFactory); }
public function setUp() { parent::setUp(); $this->environmentHelper = $this->getMock('\\OC\\IntegrityCheck\\Helpers\\EnvironmentHelper'); $this->fileAccessHelper = $this->getMock('\\OC\\IntegrityCheck\\Helpers\\FileAccessHelper'); $this->appLocator = $this->getMock('\\OC\\IntegrityCheck\\Helpers\\AppLocator'); $this->config = $this->getMock('\\OCP\\IConfig'); $this->cacheFactory = $this->getMock('\\OCP\\ICacheFactory'); $this->appManager = $this->getMock('\\OCP\\App\\IAppManager'); $this->cacheFactory->expects($this->any())->method('create')->with('oc.integritycheck.checker')->will($this->returnValue(new NullCache())); $this->checker = new Checker($this->environmentHelper, $this->fileAccessHelper, $this->appLocator, $this->config, $this->cacheFactory, $this->appManager); }