public function setUp() { parent::setUp(); $this->userId = $this->getUniqueID('user_'); $this->createUser($this->userId, $this->userId); $this->user = \OC::$server->getUserManager()->get($this->userId); /** @var \OCP\IUserSession|\PHPUnit_Framework_MockObject_MockObject $userSession */ $userSession = $this->getMock('\\OCP\\IUserSession'); $userSession->expects($this->any())->method('getUser')->will($this->returnValue($this->user)); $this->service = new UserStoragesService($this->backendService, $this->dbConfig, $userSession); }
public function setUp() { parent::setUp(); $this->userId = $this->getUniqueID('user_'); $this->user = new \OC\User\User($this->userId, null); $userSession = $this->getMock('\\OCP\\IUserSession'); $userSession->expects($this->any())->method('getUser')->will($this->returnValue($this->user)); $this->service = new UserStoragesService($userSession); // create home folder mkdir($this->dataDir . '/' . $this->userId . '/'); }
public function setUp() { parent::setUp(); $this->service = new GlobalStoragesService($this->backendService, $this->dbConfig); }
public function setUp() { parent::setUp(); $this->service = new GlobalStoragesService(); }