예제 #1
0
 public function setUp()
 {
     parent::setUp();
     $this->tree = $this->getMockBuilder('\\Sabre\\DAV\\Tree')->disableOriginalConstructor()->getMock();
     $this->server = new \Sabre\DAV\Server($this->tree);
     $this->tagManager = $this->getMock('\\OCP\\SystemTag\\ISystemTagManager');
     $this->plugin = new \OCA\DAV\SystemTag\SystemTagPlugin($this->tagManager);
     $this->plugin->initialize($this->server);
 }
예제 #2
0
 public function setUp()
 {
     parent::setUp();
     $this->tree = $this->getMockBuilder('\\Sabre\\DAV\\Tree')->disableOriginalConstructor()->getMock();
     $this->server = new \Sabre\DAV\Server($this->tree);
     $this->tagManager = $this->getMock('\\OCP\\SystemTag\\ISystemTagManager');
     $this->groupManager = $this->getMock('\\OCP\\IGroupManager');
     $this->user = $this->getMock('\\OCP\\IUser');
     $this->userSession = $this->getMock('\\OCP\\IUserSession');
     $this->userSession->expects($this->any())->method('getUser')->willReturn($this->user);
     $this->userSession->expects($this->any())->method('isLoggedIn')->willReturn(true);
     $this->plugin = new \OCA\DAV\SystemTag\SystemTagPlugin($this->tagManager, $this->groupManager, $this->userSession);
     $this->plugin->initialize($this->server);
 }