作者:hyb14
项目:cor
protected function tearDown()
{
$query = \OCP\DB::prepare('DELETE FROM `*PREFIX*share_external`');
$query->execute();
$this->restoreHttpHelper();
parent::tearDown();
}
作者:samj191
项目:rep
protected function tearDown()
{
\OC_Hook::clear('OC_Filesystem', 'post_write');
\OC_Hook::clear('OC_Filesystem', 'post_delete');
\OC_Hook::clear('OC_Filesystem', 'post_rename');
parent::tearDown();
}
作者:stwei
项目:owncloud-cor
protected function tearDown()
{
if ($this->cache) {
$this->cache->clear();
}
parent::tearDown();
}
作者:adolfo210
项目:hcloudfile
protected function setUp()
{
parent::setUp();
$this->uid = $this->getUniqueID('user');
$this->mountManager = new \OC\Files\Mount\Manager();
$this->manager = new \OCA\Files_Sharing\External\Manager(\OC::$server->getDatabaseConnection(), $this->mountManager, new StorageFactory(), $this->getMockBuilder('\\OC\\HTTPHelper')->disableOriginalConstructor()->getMock(), $this->uid);
}
作者:evanj
项目:cor
protected function tearDown()
{
if ($this->view) {
$this->view->deleteAll($this->folder);
}
self::$tempStorage = null;
parent::tearDown();
}
作者:kenw
项目:cor
protected function tearDown()
{
if ($this->view) {
$this->view->unlink($this->filename);
$this->view->deleteAll($this->folder);
}
parent::tearDown();
}
作者:TylerTem
项目:cor
protected function tearDown()
{
\OC_Hook::clear('OC_Filesystem', 'post_write');
\OC_Hook::clear('OC_Filesystem', 'post_delete');
\OC_Hook::clear('OC_Filesystem', 'post_rename');
\OC_Hook::clear('OCP\\Share', 'post_update_permissions');
parent::tearDown();
}
作者:hyb14
项目:cor
protected function setUp()
{
parent::setUp();
$this->uid = $this->getUniqueID('user');
$this->mountManager = new \OC\Files\Mount\Manager();
$this->httpHelper = $httpHelper = $this->getMockBuilder('\\OC\\HTTPHelper')->disableOriginalConstructor()->getMock();
/** @var \OC\HTTPHelper $httpHelper */
$this->manager = new Manager(\OC::$server->getDatabaseConnection(), $this->mountManager, new StorageFactory(), $httpHelper, \OC::$server->getNotificationManager(), $this->uid);
}
作者:evanj
项目:cor
protected function tearDown()
{
if ($this->view instanceof \OC\Files\View) {
$this->view->unlink($this->filename);
$this->view->deleteAll($this->folder);
}
self::$tempStorage = null;
parent::tearDown();
}
作者:lchen0
项目:STEdward
protected function setUp()
{
parent::setUp();
$this->userManager = $this->getMockBuilder('OCP\\IUserManager')->disableOriginalConstructor()->getMock();
$this->groupManager = $this->getMockBuilder('OCP\\IGroupManager')->disableOriginalConstructor()->getMock();
$this->contactsManager = $this->getMockBuilder('OCP\\Contacts\\IManager')->disableOriginalConstructor()->getMock();
$this->session = $this->getMockBuilder('OCP\\IUserSession')->disableOriginalConstructor()->getMock();
$this->request = $this->getMockBuilder('OCP\\IRequest')->disableOriginalConstructor()->getMock();
$this->sharees = new Sharees($this->groupManager, $this->userManager, $this->contactsManager, $this->getMockBuilder('OCP\\IConfig')->disableOriginalConstructor()->getMock(), $this->session, $this->getMockBuilder('OCP\\IURLGenerator')->disableOriginalConstructor()->getMock(), $this->request, $this->getMockBuilder('OCP\\ILogger')->disableOriginalConstructor()->getMock());
}
作者:Romua1
项目:cor
function tearDown()
{
$this->sharedCache->clear();
self::loginHelper(self::TEST_FILES_SHARING_API_USER1);
$fileinfo = $this->view->getFileInfo('container/shareddir');
\OCP\Share::unshare('folder', $fileinfo['fileid'], \OCP\Share::SHARE_TYPE_USER, self::TEST_FILES_SHARING_API_USER2);
$fileinfo = $this->view->getFileInfo('container/shared single file.txt');
\OCP\Share::unshare('file', $fileinfo['fileid'], \OCP\Share::SHARE_TYPE_USER, self::TEST_FILES_SHARING_API_USER2);
$this->view->deleteAll('container');
$this->ownerCache->clear();
parent::tearDown();
}
作者:evanj
项目:cor
public function setUp()
{
parent::setUp();
$this->httpClient = $this->getMock('OCP\\Http\\Client\\IClient');
$this->jobList = $this->getMock('OCP\\BackgroundJob\\IJobList');
$this->urlGenerator = $this->getMock('OCP\\IURLGenerator');
$this->trustedServers = $this->getMockBuilder('OCA\\Federation\\TrustedServers')->disableOriginalConstructor()->getMock();
$this->dbHandler = $this->getMockBuilder('OCA\\Federation\\DbHandler')->disableOriginalConstructor()->getMock();
$this->logger = $this->getMock('OCP\\ILogger');
$this->response = $this->getMock('OCP\\Http\\Client\\IResponse');
$this->getSharedSecret = new GetSharedSecret($this->httpClient, $this->urlGenerator, $this->jobList, $this->trustedServers, $this->logger, $this->dbHandler);
}
作者:GitHubUser423
项目:cor
protected function setUp()
{
parent::setUp();
$this->uid = $this->getUniqueID('user');
$this->createUser($this->uid, '');
$this->user = \OC::$server->getUserManager()->get($this->uid);
$this->mountManager = new \OC\Files\Mount\Manager();
$this->httpHelper = $httpHelper = $this->getMockBuilder('\\OC\\HTTPHelper')->disableOriginalConstructor()->getMock();
$discoveryManager = new DiscoveryManager(\OC::$server->getMemCacheFactory(), \OC::$server->getHTTPClientService());
/** @var \OC\HTTPHelper $httpHelper */
$this->manager = new Manager(\OC::$server->getDatabaseConnection(), $this->mountManager, new StorageFactory(), $httpHelper, \OC::$server->getNotificationManager(), $discoveryManager, $this->uid);
$this->mountProvider = new MountProvider(\OC::$server->getDatabaseConnection(), function () {
return $this->manager;
});
}
作者:kebenxiaomin
项目:owncloudRedi
protected function setUp()
{
parent::setUp();
$this->activity = new \OCA\Files_Sharing\Activity();
}
作者:Kevin-Z
项目:vaneDis
function __construct()
{
parent::__construct();
$this->connection = \OC::$server->getDatabaseConnection();
}
作者:ZverAlekse
项目:cor
public function tearDown()
{
parent::tearDown();
$this->cleanDB();
}
作者:stwei
项目:owncloud-cor
protected function tearDown()
{
if ($this->sharedCache) {
$this->sharedCache->clear();
}
self::loginHelper(self::TEST_FILES_SHARING_API_USER1);
$shares = $this->shareManager->getSharesBy(self::TEST_FILES_SHARING_API_USER1, \OCP\Share::SHARE_TYPE_USER);
foreach ($shares as $share) {
$this->shareManager->deleteShare($share);
}
$this->view->deleteAll('container');
$this->ownerCache->clear();
parent::tearDown();
}
作者:enoch8
项目:owncloud-testserve
public function tearDown()
{
\OC::$server->getUserManager()->removeBackend($this->userBackend);
parent::tearDown();
}
作者:enoch8
项目:owncloud-testserve
protected function tearDown()
{
$this->groupPropagationManager->tearDown();
$this->recipientGroup->removeUser($this->recipientUser);
parent::tearDown();
}
作者:Kevin-Z
项目:vaneDis
protected function setUp()
{
parent::setUp();
$this->activity = new \OCA\Files_Sharing\Activity($this->getMock('\\OC\\L10N\\Factory'), $this->getMockBuilder('\\OC\\URLGenerator')->disableOriginalConstructor()->getMock());
}