summaryrefslogtreecommitdiffstats
path: root/apps/twofactor_backupcodes/tests/Unit
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/twofactor_backupcodes/tests/Unit
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/twofactor_backupcodes/tests/Unit')
-rw-r--r--apps/twofactor_backupcodes/tests/Unit/BackgroundJob/CheckBackupCodeTest.php2
-rw-r--r--apps/twofactor_backupcodes/tests/Unit/BackgroundJob/RememberBackupCodesJobTest.php2
-rw-r--r--apps/twofactor_backupcodes/tests/Unit/Notification/NotifierTest.php12
3 files changed, 8 insertions, 8 deletions
diff --git a/apps/twofactor_backupcodes/tests/Unit/BackgroundJob/CheckBackupCodeTest.php b/apps/twofactor_backupcodes/tests/Unit/BackgroundJob/CheckBackupCodeTest.php
index 2e68c0e427b..3e14cbfa3a1 100644
--- a/apps/twofactor_backupcodes/tests/Unit/BackgroundJob/CheckBackupCodeTest.php
+++ b/apps/twofactor_backupcodes/tests/Unit/BackgroundJob/CheckBackupCodeTest.php
@@ -55,7 +55,7 @@ class CheckBackupCodeTest extends TestCase {
/** @var CheckBackupCodes */
private $checkBackupCodes;
- public function setUp(): void {
+ protected function setUp(): void {
parent::setUp();
$this->userManager = $this->createMock(IUserManager::class);
diff --git a/apps/twofactor_backupcodes/tests/Unit/BackgroundJob/RememberBackupCodesJobTest.php b/apps/twofactor_backupcodes/tests/Unit/BackgroundJob/RememberBackupCodesJobTest.php
index a6dda9ce6aa..0410facb4f7 100644
--- a/apps/twofactor_backupcodes/tests/Unit/BackgroundJob/RememberBackupCodesJobTest.php
+++ b/apps/twofactor_backupcodes/tests/Unit/BackgroundJob/RememberBackupCodesJobTest.php
@@ -54,7 +54,7 @@ class RememberBackupCodesJobTest extends TestCase {
/** @var RememberBackupCodesJob */
private $job;
- public function setUp(): void {
+ protected function setUp(): void {
parent::setUp();
$this->registry = $this->createMock(IRegistry::class);
diff --git a/apps/twofactor_backupcodes/tests/Unit/Notification/NotifierTest.php b/apps/twofactor_backupcodes/tests/Unit/Notification/NotifierTest.php
index 0bbdc8619b4..73754cecb95 100644
--- a/apps/twofactor_backupcodes/tests/Unit/Notification/NotifierTest.php
+++ b/apps/twofactor_backupcodes/tests/Unit/Notification/NotifierTest.php
@@ -64,10 +64,10 @@ class NotifierTest extends TestCase {
);
}
- /**
- * @expectedException \InvalidArgumentException
- */
+
public function testPrepareWrongApp() {
+ $this->expectException(\InvalidArgumentException::class);
+
/** @var INotification|\PHPUnit_Framework_MockObject_MockObject $notification */
$notification = $this->createMock(INotification::class);
$notification->expects($this->once())
@@ -79,10 +79,10 @@ class NotifierTest extends TestCase {
$this->notifier->prepare($notification, 'en');
}
- /**
- * @expectedException \InvalidArgumentException
- */
+
public function testPrepareWrongSubject() {
+ $this->expectException(\InvalidArgumentException::class);
+
/** @var INotification|\PHPUnit_Framework_MockObject_MockObject $notification */
$notification = $this->createMock(INotification::class);
$notification->expects($this->once())