summaryrefslogtreecommitdiffstats
path: root/apps/dav/tests/unit/CalDAV/CalendarImplTest.php
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-03-25 22:21:27 +0100
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-03-25 22:21:27 +0100
commit2ee65f177e4f7e09ad2287f14d564e7068d322fb (patch)
tree39075e87ea7927e20e8956824cb7c49bf626b178 /apps/dav/tests/unit/CalDAV/CalendarImplTest.php
parent3cf321fdfc4235a87015a9af2f59c63220016c65 (diff)
downloadnextcloud-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 'apps/dav/tests/unit/CalDAV/CalendarImplTest.php')
-rw-r--r--apps/dav/tests/unit/CalDAV/CalendarImplTest.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/apps/dav/tests/unit/CalDAV/CalendarImplTest.php b/apps/dav/tests/unit/CalDAV/CalendarImplTest.php
index 5a32b5defa5..c32d8128874 100644
--- a/apps/dav/tests/unit/CalDAV/CalendarImplTest.php
+++ b/apps/dav/tests/unit/CalDAV/CalendarImplTest.php
@@ -74,7 +74,7 @@ class CalendarImplTest extends \Test\TestCase {
$this->backend->expects($this->once())
->method('search')
->with($this->calendarInfo, 'abc', ['def'], ['ghi'], 42, 1337)
- ->will($this->returnValue(['SEARCHRESULTS']));
+ ->willReturn(['SEARCHRESULTS']);
$result = $this->calendarImpl->search('abc', ['def'], ['ghi'], 42, 1337);
$this->assertEquals($result, ['SEARCHRESULTS']);
@@ -84,9 +84,9 @@ class CalendarImplTest extends \Test\TestCase {
$this->calendar->expects($this->once())
->method('getACL')
->with()
- ->will($this->returnValue([
+ ->willReturn([
['privilege' => '{DAV:}read']
- ]));
+ ]);
$this->assertEquals(1, $this->calendarImpl->getPermissions());
}
@@ -95,9 +95,9 @@ class CalendarImplTest extends \Test\TestCase {
$this->calendar->expects($this->once())
->method('getACL')
->with()
- ->will($this->returnValue([
+ ->willReturn([
['privilege' => '{DAV:}write']
- ]));
+ ]);
$this->assertEquals(6, $this->calendarImpl->getPermissions());
}
@@ -106,10 +106,10 @@ class CalendarImplTest extends \Test\TestCase {
$this->calendar->expects($this->once())
->method('getACL')
->with()
- ->will($this->returnValue([
+ ->willReturn([
['privilege' => '{DAV:}read'],
['privilege' => '{DAV:}write']
- ]));
+ ]);
$this->assertEquals(7, $this->calendarImpl->getPermissions());
}
@@ -118,9 +118,9 @@ class CalendarImplTest extends \Test\TestCase {
$this->calendar->expects($this->once())
->method('getACL')
->with()
- ->will($this->returnValue([
+ ->willReturn([
['privilege' => '{DAV:}all']
- ]));
+ ]);
$this->assertEquals(31, $this->calendarImpl->getPermissions());
}