aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/tests/unit/Command/MoveCalendarTest.php
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2019-11-27 15:27:18 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2019-11-27 15:27:18 +0100
commit3a7cf40aaa678bea1df143d2982d603b7a334eec (patch)
tree63c1e3ad7f7f401d14411a4d44c523632906afc9 /apps/dav/tests/unit/Command/MoveCalendarTest.php
parent0568b012672d650c6b5a49e72c4028dde5463c60 (diff)
downloadnextcloud-server-3a7cf40aaa678bea1df143d2982d603b7a334eec.tar.gz
nextcloud-server-3a7cf40aaa678bea1df143d2982d603b7a334eec.zip
Mode to modern phpunit
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/dav/tests/unit/Command/MoveCalendarTest.php')
-rw-r--r--apps/dav/tests/unit/Command/MoveCalendarTest.php19
1 files changed, 10 insertions, 9 deletions
diff --git a/apps/dav/tests/unit/Command/MoveCalendarTest.php b/apps/dav/tests/unit/Command/MoveCalendarTest.php
index 50c1a57e0a8..c097427b239 100644
--- a/apps/dav/tests/unit/Command/MoveCalendarTest.php
+++ b/apps/dav/tests/unit/Command/MoveCalendarTest.php
@@ -89,12 +89,13 @@ class MoveCalendarTest extends TestCase {
/**
* @dataProvider dataExecute
*
- * @expectedException InvalidArgumentException
* @param $userOriginExists
* @param $userDestinationExists
*/
public function testWithBadUserOrigin($userOriginExists, $userDestinationExists)
{
+ $this->expectException(\InvalidArgumentException::class);
+
$this->userManager->expects($this->at(0))
->method('userExists')
->with('user')
@@ -115,12 +116,12 @@ class MoveCalendarTest extends TestCase {
]);
}
- /**
- * @expectedException InvalidArgumentException
- * @expectedExceptionMessage User <user> has no calendar named <personal>. You can run occ dav:list-calendars to list calendars URIs for this user.
- */
+
public function testMoveWithInexistantCalendar()
{
+ $this->expectException(\InvalidArgumentException::class);
+ $this->expectExceptionMessage('User <user> has no calendar named <personal>. You can run occ dav:list-calendars to list calendars URIs for this user.');
+
$this->userManager->expects($this->at(0))
->method('userExists')
->with('user')
@@ -143,12 +144,12 @@ class MoveCalendarTest extends TestCase {
]);
}
- /**
- * @expectedException InvalidArgumentException
- * @expectedExceptionMessage User <user2> already has a calendar named <personal>.
- */
+
public function testMoveWithExistingDestinationCalendar()
{
+ $this->expectException(\InvalidArgumentException::class);
+ $this->expectExceptionMessage('User <user2> already has a calendar named <personal>.');
+
$this->userManager->expects($this->at(0))
->method('userExists')
->with('user')