本文整理汇总了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);
}
示例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();
}
示例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);
}
示例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);
}