Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2021-04-14 15:46:07 +0300
committerJoas Schilling <coding@schilljs.com>2021-04-20 17:43:43 +0300
commit79ebc7f24c9c908efb5b41422150bca9cf0b7966 (patch)
tree88792eb454a2b9faaa6b56787feee4aaf14dd5eb /tests/lib/Share20
parent2228b285c5bff8627669e966ff672a857a66f097 (diff)
Fix test by defining plurals
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests/lib/Share20')
-rw-r--r--tests/lib/Share20/ManagerTest.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/lib/Share20/ManagerTest.php b/tests/lib/Share20/ManagerTest.php
index e17f179b600..a4dd621522d 100644
--- a/tests/lib/Share20/ManagerTest.php
+++ b/tests/lib/Share20/ManagerTest.php
@@ -126,6 +126,10 @@ class ManagerTest extends \Test\TestCase {
->willReturnCallback(function ($text, $parameters = []) {
return vsprintf($text, $parameters);
});
+ $this->l->method('n')
+ ->willReturnCallback(function ($singular, $plural, $count, $parameters = []) {
+ return vsprintf(str_replace('%n', $count, ($count === 1) ? $singular : $plural), $parameters);
+ });
$this->factory = new DummyFactory(\OC::$server);
@@ -1957,7 +1961,7 @@ class ManagerTest extends \Test\TestCase {
$data = [];
// No exclude groups
- $data[] = ['no', null, null, null, false];
+ $data[] = ['no', null, null, [], false];
// empty exclude list, user no groups
$data[] = ['yes', '', json_encode(['']), [], false];