diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-10-24 15:26:53 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2017-10-24 17:45:32 +0200 |
commit | 43e498844e8c1aa519a19238d2cf3d6b95e1aab0 (patch) | |
tree | 59510ef2ffc6c1fd1fd92475013b108f1da2bfeb /tests/Core/Controller/ChangePasswordControllerTest.php | |
parent | b1f77aca4effec99387481a831910d4870ae2ffc (diff) | |
download | nextcloud-server-43e498844e8c1aa519a19238d2cf3d6b95e1aab0.tar.gz nextcloud-server-43e498844e8c1aa519a19238d2cf3d6b95e1aab0.zip |
Use ::class in test mocks
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'tests/Core/Controller/ChangePasswordControllerTest.php')
-rw-r--r-- | tests/Core/Controller/ChangePasswordControllerTest.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/Core/Controller/ChangePasswordControllerTest.php b/tests/Core/Controller/ChangePasswordControllerTest.php index ea3abb58e2f..851b5bd6c76 100644 --- a/tests/Core/Controller/ChangePasswordControllerTest.php +++ b/tests/Core/Controller/ChangePasswordControllerTest.php @@ -29,6 +29,7 @@ use OCP\AppFramework\Http\JSONResponse; use OCP\IGroupManager; use OCP\IL10N; use OCP\IRequest; +use OCP\IUser; use OCP\IUserManager; class ChangePasswordControllerTest extends \Test\TestCase { @@ -91,7 +92,7 @@ class ChangePasswordControllerTest extends \Test\TestCase { } public function testChangePersonalPasswordCommonPassword() { - $user = $this->getMockBuilder('OCP\IUser')->getMock(); + $user = $this->getMockBuilder(IUser::class)->getMock(); $this->userManager->expects($this->once()) ->method('checkPassword') ->with($this->userId, 'old') @@ -114,7 +115,7 @@ class ChangePasswordControllerTest extends \Test\TestCase { } public function testChangePersonalPasswordNoNewPassword() { - $user = $this->getMockBuilder('OCP\IUser')->getMock(); + $user = $this->getMockBuilder(IUser::class)->getMock(); $this->userManager->expects($this->once()) ->method('checkPassword') ->with($this->userId, 'old') @@ -130,7 +131,7 @@ class ChangePasswordControllerTest extends \Test\TestCase { } public function testChangePersonalPasswordCantSetPassword() { - $user = $this->getMockBuilder('OCP\IUser')->getMock(); + $user = $this->getMockBuilder(IUser::class)->getMock(); $this->userManager->expects($this->once()) ->method('checkPassword') ->with($this->userId, 'old') @@ -150,7 +151,7 @@ class ChangePasswordControllerTest extends \Test\TestCase { } public function testChangePersonalPassword() { - $user = $this->getMockBuilder('OCP\IUser')->getMock(); + $user = $this->getMockBuilder(IUser::class)->getMock(); $this->userManager->expects($this->once()) ->method('checkPassword') ->with($this->userId, 'old') |