diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2019-07-09 09:05:30 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2019-07-09 13:57:04 +0200 |
commit | 3cc3b0f0d881be4a0b2b24b80cb3c0213f4a4778 (patch) | |
tree | 85489d1db84fef443c0a878d46fbfb3a1c06933e /apps/provisioning_api | |
parent | d058ef2b6c6b3faf354fd8abeecb4cd71949d5a6 (diff) | |
download | nextcloud-server-3cc3b0f0d881be4a0b2b24b80cb3c0213f4a4778.tar.gz nextcloud-server-3cc3b0f0d881be4a0b2b24b80cb3c0213f4a4778.zip |
Update tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/provisioning_api')
-rw-r--r-- | apps/provisioning_api/tests/Controller/UsersControllerTest.php | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/apps/provisioning_api/tests/Controller/UsersControllerTest.php b/apps/provisioning_api/tests/Controller/UsersControllerTest.php index 64def2c551e..325b1b204dc 100644 --- a/apps/provisioning_api/tests/Controller/UsersControllerTest.php +++ b/apps/provisioning_api/tests/Controller/UsersControllerTest.php @@ -33,6 +33,7 @@ namespace OCA\Provisioning_API\Tests\Controller; use Exception; use OC\Accounts\AccountManager; +use OC\Authentication\Token\RemoteWipe; use OC\Group\Manager; use OCA\FederatedFileSharing\AppInfo\Application; use OCA\FederatedFileSharing\FederatedShareProvider; @@ -54,6 +55,7 @@ use OCP\IUserSession; use OCP\L10N\IFactory; use OCP\Security\ISecureRandom; use OCP\UserInterface; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit_Framework_MockObject_MockObject; use Test\TestCase; @@ -85,6 +87,8 @@ class UsersControllerTest extends TestCase { private $federatedFileSharingFactory; /** @var ISecureRandom|\PHPUnit_Framework_MockObject_MockObject */ private $secureRandom; + /** @var RemoteWipe|MockObject */ + private $remoteWipe; protected function setUp() { parent::setUp(); @@ -101,6 +105,7 @@ class UsersControllerTest extends TestCase { $this->newUserMailHelper = $this->createMock(NewUserMailHelper::class); $this->federatedFileSharingFactory = $this->createMock(FederatedFileSharingFactory::class); $this->secureRandom = $this->createMock(ISecureRandom::class); + $this->remoteWipe = $this->createMock(RemoteWipe::class); $this->api = $this->getMockBuilder(UsersController::class) ->setConstructorArgs([ @@ -116,7 +121,8 @@ class UsersControllerTest extends TestCase { $this->l10nFactory, $this->newUserMailHelper, $this->federatedFileSharingFactory, - $this->secureRandom + $this->secureRandom, + $this->remoteWipe, ]) ->setMethods(['fillStorageInfo']) ->getMock(); @@ -377,7 +383,8 @@ class UsersControllerTest extends TestCase { $this->l10nFactory, $this->newUserMailHelper, $this->federatedFileSharingFactory, - $this->secureRandom + $this->secureRandom, + $this->remoteWipe ]) ->setMethods(['editUser']) ->getMock(); @@ -3112,7 +3119,8 @@ class UsersControllerTest extends TestCase { $this->l10nFactory, $this->newUserMailHelper, $this->federatedFileSharingFactory, - $this->secureRandom + $this->secureRandom, + $this->remoteWipe, ]) ->setMethods(['getUserData']) ->getMock(); @@ -3175,7 +3183,8 @@ class UsersControllerTest extends TestCase { $this->l10nFactory, $this->newUserMailHelper, $this->federatedFileSharingFactory, - $this->secureRandom + $this->secureRandom, + $this->remoteWipe, ]) ->setMethods(['getUserData']) ->getMock(); |