diff options
Diffstat (limited to 'tests/lib/Authentication/TwoFactorAuth/ProviderManagerTest.php')
-rw-r--r-- | tests/lib/Authentication/TwoFactorAuth/ProviderManagerTest.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/lib/Authentication/TwoFactorAuth/ProviderManagerTest.php b/tests/lib/Authentication/TwoFactorAuth/ProviderManagerTest.php index f776e244c27..e34d844c3a4 100644 --- a/tests/lib/Authentication/TwoFactorAuth/ProviderManagerTest.php +++ b/tests/lib/Authentication/TwoFactorAuth/ProviderManagerTest.php @@ -59,10 +59,10 @@ class ProviderManagerTest extends TestCase { ); } - /** - * @expectedException \OC\Authentication\Exceptions\InvalidProviderException - */ + public function testTryEnableInvalidProvider() { + $this->expectException(\OC\Authentication\Exceptions\InvalidProviderException::class); + $user = $this->createMock(IUser::class); $this->providerManager->tryEnableProviderFor('none', $user); } @@ -105,10 +105,10 @@ class ProviderManagerTest extends TestCase { $this->assertTrue($res); } - /** - * @expectedException \OC\Authentication\Exceptions\InvalidProviderException - */ + public function testTryDisableInvalidProvider() { + $this->expectException(\OC\Authentication\Exceptions\InvalidProviderException::class); + $user = $this->createMock(IUser::class); $this->providerManager->tryDisableProviderFor('none', $user); } |