diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2016-09-02 11:07:26 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2016-09-06 09:29:27 +0200 |
commit | 4d3b92e68782ce7ab3ef58b6be715a76df2a6955 (patch) | |
tree | b71f297f78a6deddf69d0105de0e8f491c5dd9a1 /tests/lib/Authentication/TwoFactorAuth | |
parent | 3a3a17b2e33351b82d987c2f82016a1a85eb2aed (diff) | |
download | nextcloud-server-4d3b92e68782ce7ab3ef58b6be715a76df2a6955.tar.gz nextcloud-server-4d3b92e68782ce7ab3ef58b6be715a76df2a6955.zip |
Fix getMock Authentication
Diffstat (limited to 'tests/lib/Authentication/TwoFactorAuth')
-rw-r--r-- | tests/lib/Authentication/TwoFactorAuth/ManagerTest.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/lib/Authentication/TwoFactorAuth/ManagerTest.php b/tests/lib/Authentication/TwoFactorAuth/ManagerTest.php index 83a74f2f253..b3fd28a30ad 100644 --- a/tests/lib/Authentication/TwoFactorAuth/ManagerTest.php +++ b/tests/lib/Authentication/TwoFactorAuth/ManagerTest.php @@ -59,19 +59,19 @@ class ManagerTest extends TestCase { protected function setUp() { parent::setUp(); - $this->user = $this->getMockBuilder('\OCP\IUser')->getMock(); + $this->user = $this->createMock(IUser::class); $this->appManager = $this->getMockBuilder('\OC\App\AppManager') ->disableOriginalConstructor() ->getMock(); - $this->session = $this->getMockBuilder('\OCP\ISession')->getMock(); - $this->config = $this->getMockBuilder('\OCP\IConfig')->getMock(); + $this->session = $this->createMock(ISession::class); + $this->config = $this->createMock(IConfig::class); $this->manager = $this->getMockBuilder('\OC\Authentication\TwoFactorAuth\Manager') ->setConstructorArgs([$this->appManager, $this->session, $this->config]) ->setMethods(['loadTwoFactorApp']) // Do not actually load the apps ->getMock(); - $this->fakeProvider = $this->getMockBuilder('\OCP\Authentication\TwoFactorAuth\IProvider')->getMock(); + $this->fakeProvider = $this->createMock(IProvider::class); $this->fakeProvider->expects($this->any()) ->method('getId') ->will($this->returnValue('email')); @@ -268,7 +268,7 @@ class ManagerTest extends TestCase { } public function testNeedsSecondFactor() { - $user = $this->getMock('\OCP\IUser'); + $user = $this->createMock(IUser::class); $this->session->expects($this->once()) ->method('exists') ->with('two_factor_auth_uid') |