当前位置: 首页>>代码示例>>PHP>>正文


PHP IL10N::method方法代码示例

本文整理汇总了PHP中OCP\IL10N::method方法的典型用法代码示例。如果您正苦于以下问题:PHP IL10N::method方法的具体用法?PHP IL10N::method怎么用?PHP IL10N::method使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在OCP\IL10N的用法示例。


在下文中一共展示了IL10N::method方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setUp

 public function setUp()
 {
     $this->logger = $this->getMock('\\OCP\\ILogger');
     $this->config = $this->getMock('\\OCP\\IConfig');
     $this->defaultProvider = $this->getMock('\\OC\\Share20\\IShareProvider');
     $this->secureRandom = $this->getMock('\\OCP\\Security\\ISecureRandom');
     $this->hasher = $this->getMock('\\OCP\\Security\\IHasher');
     $this->mountManager = $this->getMock('\\OCP\\Files\\Mount\\IMountManager');
     $this->groupManager = $this->getMock('\\OCP\\IGroupManager');
     $this->l = $this->getMock('\\OCP\\IL10N');
     $this->l->method('t')->will($this->returnCallback(function ($text, $parameters = []) {
         return vsprintf($text, $parameters);
     }));
     $this->manager = new Manager($this->logger, $this->config, $this->defaultProvider, $this->secureRandom, $this->hasher, $this->mountManager, $this->groupManager, $this->l);
 }
开发者ID:gcstang,项目名称:core,代码行数:15,代码来源:managertest.php

示例2: setUp

 public function setUp()
 {
     parent::setUp();
     $this->connection = \OC::$server->getDatabaseConnection();
     $this->notifications = $this->getMockBuilder('OCA\\FederatedFileSharing\\Notifications')->disableOriginalConstructor()->getMock();
     $this->tokenHandler = $this->getMockBuilder('OCA\\FederatedFileSharing\\TokenHandler')->disableOriginalConstructor()->getMock();
     $this->l = $this->getMock('OCP\\IL10N');
     $this->l->method('t')->will($this->returnCallback(function ($text, $parameters = []) {
         return vsprintf($text, $parameters);
     }));
     $this->logger = $this->getMock('OCP\\ILogger');
     $this->rootFolder = $this->getMock('OCP\\Files\\IRootFolder');
     $this->addressHandler = new AddressHandler(\OC::$server->getURLGenerator(), $this->l);
     $this->provider = new FederatedShareProvider($this->connection, $this->addressHandler, $this->notifications, $this->tokenHandler, $this->l, $this->logger, $this->rootFolder);
     $this->shareManager = \OC::$server->getShareManager();
 }
开发者ID:gvde,项目名称:core,代码行数:16,代码来源:federatedshareprovidertest.php

示例3: setUp

 protected function setUp()
 {
     $this->shareManager = $this->getMockBuilder('OCP\\Share\\IManager')->disableOriginalConstructor()->getMock();
     $this->shareManager->expects($this->any())->method('shareApiEnabled')->willReturn(true);
     $this->groupManager = $this->getMock('OCP\\IGroupManager');
     $this->userManager = $this->getMock('OCP\\IUserManager');
     $this->request = $this->getMock('OCP\\IRequest');
     $this->rootFolder = $this->getMock('OCP\\Files\\IRootFolder');
     $this->urlGenerator = $this->getMock('OCP\\IURLGenerator');
     $this->currentUser = $this->getMock('OCP\\IUser');
     $this->currentUser->method('getUID')->willReturn('currentUser');
     $this->l = $this->getMock('\\OCP\\IL10N');
     $this->l->method('t')->will($this->returnCallback(function ($text, $parameters = []) {
         return vsprintf($text, $parameters);
     }));
     $this->ocs = new Share20OCS($this->shareManager, $this->groupManager, $this->userManager, $this->request, $this->rootFolder, $this->urlGenerator, $this->currentUser, $this->l);
 }
开发者ID:stweil,项目名称:owncloud-core,代码行数:17,代码来源:share20ocstest.php

示例4: setUp

 public function setUp()
 {
     $this->logger = $this->getMock('\\OCP\\ILogger');
     $this->config = $this->getMock('\\OCP\\IConfig');
     $this->secureRandom = $this->getMock('\\OCP\\Security\\ISecureRandom');
     $this->hasher = $this->getMock('\\OCP\\Security\\IHasher');
     $this->mountManager = $this->getMock('\\OCP\\Files\\Mount\\IMountManager');
     $this->groupManager = $this->getMock('\\OCP\\IGroupManager');
     $this->l = $this->getMock('\\OCP\\IL10N');
     $this->l->method('t')->will($this->returnCallback(function ($text, $parameters = []) {
         return vsprintf($text, $parameters);
     }));
     $this->factory = new DummyFactory(\OC::$server);
     $this->manager = new Manager($this->logger, $this->config, $this->secureRandom, $this->hasher, $this->mountManager, $this->groupManager, $this->l, $this->factory);
     $this->defaultProvider = $this->getMockBuilder('\\OC\\Share20\\DefaultShareProvider')->disableOriginalConstructor()->getMock();
     $this->defaultProvider->method('identifier')->willReturn('default');
     $this->factory->setProvider($this->defaultProvider);
 }
开发者ID:podemos-info,项目名称:owncloud-core,代码行数:18,代码来源:managertest.php


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