• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Tests\TestCase类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中OCA\Files_Sharing\Tests\TestCase的典型用法代码示例。如果您正苦于以下问题:PHP TestCase类的具体用法?PHP TestCase怎么用?PHP TestCase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了TestCase类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: tearDown

 public function tearDown()
 {
     parent::tearDown();
     $this->cleanDB();
 }
开发者ID:ZverAleksey,项目名称:core,代码行数:5,代码来源:migrationtest.php


示例17: tearDown

 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();
 }
开发者ID:stweil,项目名称:owncloud-core,代码行数:14,代码来源:cache.php


示例18: tearDown

 public function tearDown()
 {
     \OC::$server->getUserManager()->removeBackend($this->userBackend);
     parent::tearDown();
 }
开发者ID:enoch85,项目名称:owncloud-testserver,代码行数:5,代码来源:locking.php


示例19: tearDown

 protected function tearDown()
 {
     $this->groupPropagationManager->tearDown();
     $this->recipientGroup->removeUser($this->recipientUser);
     parent::tearDown();
 }
开发者ID:enoch85,项目名称:owncloud-testserver,代码行数:6,代码来源:grouppropagationmanager.php


示例20: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->activity = new \OCA\Files_Sharing\Activity($this->getMock('\\OC\\L10N\\Factory'), $this->getMockBuilder('\\OC\\URLGenerator')->disableOriginalConstructor()->getMock());
 }
开发者ID:Kevin-ZK,项目名称:vaneDisk,代码行数:5,代码来源:activity.php



注:本文中的OCA\Files_Sharing\Tests\TestCase类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Files_Trashbin\Trashbin类代码示例发布时间:2022-05-23
下一篇:
PHP Files_Sharing\Helper类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap