コード例 #1
0
 public function setUp()
 {
     parent::setUp();
     $this->globalStoragesService = $this->service;
     $this->user = new \OC\User\User(self::USER_ID, null);
     $userSession = $this->getMock('\\OCP\\IUserSession');
     $userSession->expects($this->any())->method('getUser')->will($this->returnValue($this->user));
     $this->groupManager = $this->getMock('\\OCP\\IGroupManager');
     $this->groupManager->method('isInGroup')->will($this->returnCallback(function ($userId, $groupId) {
         if ($userId === self::USER_ID && $groupId === self::GROUP_ID) {
             return true;
         }
         return false;
     }));
     $this->service = new UserGlobalStoragesService($this->backendService, $userSession, $this->groupManager);
 }
コード例 #2
0
 /**
  * @expectedException \DomainException
  */
 public function testDeleteUnexistingStorage()
 {
     parent::testDeleteUnexistingStorage();
 }