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 /apps/theming/tests
parent3cf321fdfc4235a87015a9af2f59c63220016c65 (diff)
Use the shorter phpunit syntax for mocked return values
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/theming/tests')
-rw-r--r--apps/theming/tests/Controller/ThemingControllerTest.php40
1 files changed, 20 insertions, 20 deletions
diff --git a/apps/theming/tests/Controller/ThemingControllerTest.php b/apps/theming/tests/Controller/ThemingControllerTest.php
index 8c5f111acee..d6f8ff4c6b0 100644
--- a/apps/theming/tests/Controller/ThemingControllerTest.php
+++ b/apps/theming/tests/Controller/ThemingControllerTest.php
@@ -153,9 +153,9 @@ class ThemingControllerTest extends TestCase {
$this->l10n
->expects($this->once())
->method('t')
- ->will($this->returnCallback(function($str) {
+ ->willReturnCallback(function($str) {
return $str;
- }));
+ });
$this->scssCacher
->expects($this->once())
->method('getCachedSCSS')
@@ -212,9 +212,9 @@ class ThemingControllerTest extends TestCase {
$this->l10n
->expects($this->any())
->method('t')
- ->will($this->returnCallback(function($str) {
+ ->willReturnCallback(function($str) {
return $str;
- }));
+ });
$expected = new DataResponse(
[
@@ -243,9 +243,9 @@ class ThemingControllerTest extends TestCase {
$this->l10n
->expects($this->any())
->method('t')
- ->will($this->returnCallback(function($str) {
+ ->willReturnCallback(function($str) {
return $str;
- }));
+ });
$expected = new DataResponse(
[
@@ -291,9 +291,9 @@ class ThemingControllerTest extends TestCase {
$this->l10n
->expects($this->any())
->method('t')
- ->will($this->returnCallback(function($str) {
+ ->willReturnCallback(function($str) {
return $str;
- }));
+ });
$folder = $this->createMock(ISimpleFolder::class);
$this->appData
@@ -335,9 +335,9 @@ class ThemingControllerTest extends TestCase {
$this->l10n
->expects($this->any())
->method('t')
- ->will($this->returnCallback(function($str) {
+ ->willReturnCallback(function($str) {
return $str;
- }));
+ });
$folder = $this->createMock(ISimpleFolder::class);
$this->appData
@@ -396,9 +396,9 @@ class ThemingControllerTest extends TestCase {
$this->l10n
->expects($this->any())
->method('t')
- ->will($this->returnCallback(function($str) {
+ ->willReturnCallback(function($str) {
return $str;
- }));
+ });
$file = $this->createMock(ISimpleFile::class);
@@ -472,9 +472,9 @@ class ThemingControllerTest extends TestCase {
$this->l10n
->expects($this->any())
->method('t')
- ->will($this->returnCallback(function($str) {
+ ->willReturnCallback(function($str) {
return $str;
- }));
+ });
$file = $this->createMock(ISimpleFile::class);
$folder = $this->createMock(ISimpleFolder::class);
@@ -546,9 +546,9 @@ class ThemingControllerTest extends TestCase {
$this->l10n
->expects($this->any())
->method('t')
- ->will($this->returnCallback(function($str) {
+ ->willReturnCallback(function($str) {
return $str;
- }));
+ });
$folder = $this->createMock(ISimpleFolder::class);
$this->appData
@@ -604,9 +604,9 @@ class ThemingControllerTest extends TestCase {
$this->l10n
->expects($this->any())
->method('t')
- ->will($this->returnCallback(function($str) {
+ ->willReturnCallback(function($str) {
return $str;
- }));
+ });
$expected = new DataResponse(
[
@@ -643,9 +643,9 @@ class ThemingControllerTest extends TestCase {
$this->l10n
->expects($this->any())
->method('t')
- ->will($this->returnCallback(function($str) {
+ ->willReturnCallback(function($str) {
return $str;
- }));
+ });
$expected = new DataResponse(
[