From 3a7cf40aaa678bea1df143d2982d603b7a334eec Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Wed, 27 Nov 2019 15:27:18 +0100 Subject: Mode to modern phpunit Signed-off-by: Roeland Jago Douma --- tests/lib/Authentication/TwoFactorAuth/ProviderLoaderTest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/lib/Authentication/TwoFactorAuth/ProviderLoaderTest.php') diff --git a/tests/lib/Authentication/TwoFactorAuth/ProviderLoaderTest.php b/tests/lib/Authentication/TwoFactorAuth/ProviderLoaderTest.php index 634ab97a8bf..f3762976837 100644 --- a/tests/lib/Authentication/TwoFactorAuth/ProviderLoaderTest.php +++ b/tests/lib/Authentication/TwoFactorAuth/ProviderLoaderTest.php @@ -52,11 +52,11 @@ class ProviderLoaderTest extends TestCase { $this->loader = new ProviderLoader($this->appManager); } - /** - * @expectedException Exception - * @expectedExceptionMessage Could not load two-factor auth provider \OCA\MyFaulty2faApp\DoesNotExist - */ + public function testFailHardIfProviderCanNotBeLoaded() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('Could not load two-factor auth provider \\OCA\\MyFaulty2faApp\\DoesNotExist'); + $this->appManager->expects($this->once()) ->method('getEnabledAppsForUser') ->with($this->user) -- cgit v1.2.3