當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。