diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-03-25 22:21:27 +0100 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-03-25 22:21:27 +0100 |
commit | 2ee65f177e4f7e09ad2287f14d564e7068d322fb (patch) | |
tree | 39075e87ea7927e20e8956824cb7c49bf626b178 /tests/lib/L10N | |
parent | 3cf321fdfc4235a87015a9af2f59c63220016c65 (diff) | |
download | nextcloud-server-2ee65f177e4f7e09ad2287f14d564e7068d322fb.tar.gz nextcloud-server-2ee65f177e4f7e09ad2287f14d564e7068d322fb.zip |
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.php | 12 |
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; |