From 3521f974db2cf7bebac66ab4c987bb3c67d5d02f Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Thu, 16 Jun 2016 11:07:44 +0200 Subject: [PATCH] assert app is loaded in unit tests --- tests/lib/Authentication/TwoFactorAuth/ManagerTest.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/lib/Authentication/TwoFactorAuth/ManagerTest.php b/tests/lib/Authentication/TwoFactorAuth/ManagerTest.php index 283ba7f9424..586fd3aaa2e 100644 --- a/tests/lib/Authentication/TwoFactorAuth/ManagerTest.php +++ b/tests/lib/Authentication/TwoFactorAuth/ManagerTest.php @@ -86,6 +86,10 @@ class ManagerTest extends TestCase { '\OCA\MyCustom2faApp\FakeProvider', ], ])); + + $this->manager->expects($this->once()) + ->method('loadTwoFactorApp') + ->with('mycustom2faapp'); } /** @@ -97,6 +101,9 @@ class ManagerTest extends TestCase { ->method('getEnabledAppsForUser') ->with($this->user) ->will($this->returnValue(['faulty2faapp'])); + $this->manager->expects($this->once()) + ->method('loadTwoFactorApp') + ->with('faulty2faapp'); $this->appManager->expects($this->once()) ->method('getAppInfo') -- 2.39.5