當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Tests\TestCase類代碼示例

本文整理匯總了PHP中OCA\Files_Sharing\Tests\TestCase的典型用法代碼示例。如果您正苦於以下問題:PHP TestCase類的具體用法?PHP TestCase怎麽用?PHP TestCase使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了TestCase類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: tearDown

 protected function tearDown()
 {
     $query = \OCP\DB::prepare('DELETE FROM `*PREFIX*share_external`');
     $query->execute();
     $this->restoreHttpHelper();
     parent::tearDown();
 }
開發者ID:hyb148,項目名稱:core,代碼行數:7,代碼來源:server2server.php

示例2: tearDown

 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();
 }
開發者ID:samj1912,項目名稱:repo,代碼行數:7,代碼來源:etagpropagation.php

示例3: tearDown

 protected function tearDown()
 {
     if ($this->cache) {
         $this->cache->clear();
     }
     parent::tearDown();
 }
開發者ID:stweil,項目名稱:owncloud-core,代碼行數:7,代碼來源:cache.php

示例4: setUp

 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);
 }
開發者ID:adolfo2103,項目名稱:hcloudfilem,代碼行數:7,代碼來源:managertest.php

示例5: tearDown

 protected function tearDown()
 {
     if ($this->view) {
         $this->view->deleteAll($this->folder);
     }
     self::$tempStorage = null;
     parent::tearDown();
 }
開發者ID:evanjt,項目名稱:core,代碼行數:8,代碼來源:unsharechildren.php

示例6: tearDown

 protected function tearDown()
 {
     if ($this->view) {
         $this->view->unlink($this->filename);
         $this->view->deleteAll($this->folder);
     }
     parent::tearDown();
 }
開發者ID:kenwi,項目名稱:core,代碼行數:8,代碼來源:backend.php

示例7: tearDown

 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();
 }
開發者ID:TylerTemp,項目名稱:core,代碼行數:8,代碼來源:etagpropagation.php

示例8: setUp

 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);
 }
開發者ID:hyb148,項目名稱:core,代碼行數:9,代碼來源:managertest.php

示例9: tearDown

 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();
 }
開發者ID:evanjt,項目名稱:core,代碼行數:9,代碼來源:api.php

示例10: setUp

 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());
 }
開發者ID:lchen01,項目名稱:STEdwards,代碼行數:10,代碼來源:shareestest.php

示例11: tearDown

 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();
 }
開發者ID:Romua1d,項目名稱:core,代碼行數:12,代碼來源:cache.php

示例12: setUp

 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);
 }
開發者ID:evanjt,項目名稱:core,代碼行數:12,代碼來源:getsharedsecrettest.php

示例13: setUp

 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;
     });
 }
開發者ID:GitHubUser4234,項目名稱:core,代碼行數:15,代碼來源:ManagerTest.php

示例14: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->activity = new \OCA\Files_Sharing\Activity();
 }
開發者ID:kebenxiaoming,項目名稱:owncloudRedis,代碼行數:5,代碼來源:activity.php

示例15:

 function __construct()
 {
     parent::__construct();
     $this->connection = \OC::$server->getDatabaseConnection();
 }
開發者ID:Kevin-ZK,項目名稱:vaneDisk,代碼行數:5,代碼來源:migrationtest.php


注:本文中的OCA\Files_Sharing\Tests\TestCase類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。