diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2020-09-07 17:51:07 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2020-09-08 22:50:05 +0200 |
commit | f95982861634d26da1900f9704c04dbf34dc6e72 (patch) | |
tree | 37c29fc071fdb6f5bf898dc4ada7b9e123e28f90 /apps/settings/tests | |
parent | 919a8d473b0f63de585fe37c44368a4ddcf4253a (diff) | |
download | nextcloud-server-f95982861634d26da1900f9704c04dbf34dc6e72.tar.gz nextcloud-server-f95982861634d26da1900f9704c04dbf34dc6e72.zip |
emit typed event for user management
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps/settings/tests')
-rw-r--r-- | apps/settings/tests/Controller/UsersControllerTest.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/apps/settings/tests/Controller/UsersControllerTest.php b/apps/settings/tests/Controller/UsersControllerTest.php index f15734d1f86..4679fd8f7ba 100644 --- a/apps/settings/tests/Controller/UsersControllerTest.php +++ b/apps/settings/tests/Controller/UsersControllerTest.php @@ -36,6 +36,7 @@ use OCP\AppFramework\Http; use OCP\BackgroundJob\IJobList; use OCP\Encryption\IEncryptionModule; use OCP\Encryption\IManager; +use OCP\EventDispatcher\IEventDispatcher; use OCP\IAvatarManager; use OCP\IConfig; use OCP\IGroupManager; @@ -55,7 +56,6 @@ use OCP\Security\ISecureRandom; * @package Tests\Settings\Controller */ class UsersControllerTest extends \Test\TestCase { - /** @var IGroupManager|\PHPUnit\Framework\MockObject\MockObject */ private $groupManager; /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */ @@ -90,6 +90,8 @@ class UsersControllerTest extends \Test\TestCase { private $encryptionManager; /** @var IEncryptionModule | \PHPUnit\Framework\MockObject\MockObject */ private $encryptionModule; + /** @var IEventDispatcher|\PHPUnit\Framework\MockObject\MockObject */ + private $dispatcher; protected function setUp(): void { parent::setUp(); @@ -106,6 +108,7 @@ class UsersControllerTest extends \Test\TestCase { $this->securityManager = $this->getMockBuilder(\OC\Security\IdentityProof\Manager::class)->disableOriginalConstructor()->getMock(); $this->jobList = $this->createMock(IJobList::class); $this->encryptionManager = $this->createMock(IManager::class); + $this->dispatcher = $this->createMock(IEventDispatcher::class); $this->l->method('t') ->willReturnCallback(function ($text, $parameters = []) { @@ -140,7 +143,8 @@ class UsersControllerTest extends \Test\TestCase { $this->accountManager, $this->securityManager, $this->jobList, - $this->encryptionManager + $this->encryptionManager, + $this->dispatcher ); } else { return $this->getMockBuilder(UsersController::class) @@ -160,7 +164,8 @@ class UsersControllerTest extends \Test\TestCase { $this->accountManager, $this->securityManager, $this->jobList, - $this->encryptionManager + $this->encryptionManager, + $this->dispatcher ] )->setMethods($mockedMethods)->getMock(); } |