diff options
author | Joas Schilling <coding@schilljs.com> | 2021-04-14 14:46:07 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2021-04-20 16:43:43 +0200 |
commit | 79ebc7f24c9c908efb5b41422150bca9cf0b7966 (patch) | |
tree | 88792eb454a2b9faaa6b56787feee4aaf14dd5eb /tests/lib/Share20/ManagerTest.php | |
parent | 2228b285c5bff8627669e966ff672a857a66f097 (diff) | |
download | nextcloud-server-79ebc7f24c9c908efb5b41422150bca9cf0b7966.tar.gz nextcloud-server-79ebc7f24c9c908efb5b41422150bca9cf0b7966.zip |
Fix test by defining plurals
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests/lib/Share20/ManagerTest.php')
-rw-r--r-- | tests/lib/Share20/ManagerTest.php | 6 |
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]; |