diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2020-10-22 11:25:33 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2020-10-23 12:25:31 +0200 |
commit | 86e5e7d9274241b0373bfa494896534b251e1978 (patch) | |
tree | 93bf7a5cee299889b8143304537265b1a5553b33 /apps/user_ldap/tests/User_ProxyTest.php | |
parent | 872f03209cccd376c0be908581164f245e558070 (diff) | |
download | nextcloud-server-86e5e7d9274241b0373bfa494896534b251e1978.tar.gz nextcloud-server-86e5e7d9274241b0373bfa494896534b251e1978.zip |
LDAP simplify User_Proxy and Group_Proxy signatures
- make User_Proxy and Group_Proxy easy to instantiate
- simplify dependent code
- move commands to info.xml
- make UpdateGroups job class non-static
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps/user_ldap/tests/User_ProxyTest.php')
-rw-r--r-- | apps/user_ldap/tests/User_ProxyTest.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/user_ldap/tests/User_ProxyTest.php b/apps/user_ldap/tests/User_ProxyTest.php index 5753990a736..0bbea00ed44 100644 --- a/apps/user_ldap/tests/User_ProxyTest.php +++ b/apps/user_ldap/tests/User_ProxyTest.php @@ -29,6 +29,7 @@ namespace OCA\User_LDAP\Tests; +use OCA\User_LDAP\Helper; use OCA\User_LDAP\ILDAPWrapper; use OCA\User_LDAP\User_Proxy; use OCA\User_LDAP\UserPluginManager; @@ -38,6 +39,8 @@ use OCP\Notification\IManager as INotificationManager; use Test\TestCase; class User_ProxyTest extends TestCase { + /** @var Helper|\PHPUnit\Framework\MockObject\MockObject */ + protected $helper; /** @var ILDAPWrapper|\PHPUnit\Framework\MockObject\MockObject */ private $ldapWrapper; /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */ @@ -54,6 +57,7 @@ class User_ProxyTest extends TestCase { protected function setUp(): void { parent::setUp(); + $this->helper = $this->createMock(Helper::class); $this->ldapWrapper = $this->createMock(ILDAPWrapper::class); $this->config = $this->createMock(IConfig::class); $this->notificationManager = $this->createMock(INotificationManager::class); @@ -61,7 +65,7 @@ class User_ProxyTest extends TestCase { $this->userPluginManager = $this->createMock(UserPluginManager::class); $this->proxy = $this->getMockBuilder(User_Proxy::class) ->setConstructorArgs([ - [], + $this->helper, $this->ldapWrapper, $this->config, $this->notificationManager, |