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:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-03-26 00:21:27 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-03-26 00:21:27 +0300
commit2ee65f177e4f7e09ad2287f14d564e7068d322fb (patch)
tree39075e87ea7927e20e8956824cb7c49bf626b178 /tests/lib/L10N
parent3cf321fdfc4235a87015a9af2f59c63220016c65 (diff)
Use the shorter phpunit syntax for mocked return values
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'tests/lib/L10N')
-rw-r--r--tests/lib/L10N/FactoryTest.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/lib/L10N/FactoryTest.php b/tests/lib/L10N/FactoryTest.php
index c75bfba5b99..4d35aeabc91 100644
--- a/tests/lib/L10N/FactoryTest.php
+++ b/tests/lib/L10N/FactoryTest.php
@@ -510,7 +510,7 @@ class FactoryTest extends TestCase {
$this->config->expects($this->any())
->method('getSystemValue')
- ->will($this->returnCallback(function($var, $default) use ($defaultLang) {
+ ->willReturnCallback(function($var, $default) use ($defaultLang) {
if ($var === 'installed') {
return true;
} else if ($var === 'default_language') {
@@ -518,7 +518,7 @@ class FactoryTest extends TestCase {
} else {
return $default;
}
- }));
+ });
if ($loggedIn) {
$user = $this->getMockBuilder(IUser::class)
@@ -549,14 +549,14 @@ class FactoryTest extends TestCase {
$factory = $this->getFactory(['languageExists', 'findAvailableLanguages', 'respectDefaultLanguage']);
$factory->expects($this->any())
->method('languageExists')
- ->will($this->returnCallback(function ($app, $lang) use ($availableLang) {
+ ->willReturnCallback(function ($app, $lang) use ($availableLang) {
return in_array($lang, $availableLang);
- }));
+ });
$factory->expects($this->any())
->method('findAvailableLanguages')
- ->will($this->returnCallback(function ($app) use ($availableLang) {
+ ->willReturnCallback(function ($app) use ($availableLang) {
return $availableLang;
- }));
+ });
$factory->expects($this->any())
->method('respectDefaultLanguage')->willReturnCallback(function($app, $lang) {
return $lang;