diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2019-11-28 08:36:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-28 08:36:10 +0100 |
commit | 669302e570024c83140ff5c4f4b1489c5a1c66ed (patch) | |
tree | 010182798f5c83193554031753e063a8a0b35ca1 /apps/user_ldap/tests/GroupLDAPPluginTest.php | |
parent | 125be68311a319f2b839e5aa4ea29cd642cd1e00 (diff) | |
parent | e3e782b63df4f1d65c86cb3b204b4bdecf93a6cd (diff) | |
download | nextcloud-server-669302e570024c83140ff5c4f4b1489c5a1c66ed.tar.gz nextcloud-server-669302e570024c83140ff5c4f4b1489c5a1c66ed.zip |
Merge pull request #18064 from nextcloud/feature/php74
Add php7.4 support
Diffstat (limited to 'apps/user_ldap/tests/GroupLDAPPluginTest.php')
-rw-r--r-- | apps/user_ldap/tests/GroupLDAPPluginTest.php | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/apps/user_ldap/tests/GroupLDAPPluginTest.php b/apps/user_ldap/tests/GroupLDAPPluginTest.php index 3b8bfd795c5..773f937a77e 100644 --- a/apps/user_ldap/tests/GroupLDAPPluginTest.php +++ b/apps/user_ldap/tests/GroupLDAPPluginTest.php @@ -84,11 +84,11 @@ class GroupLDAPPluginTest extends \Test\TestCase { $pluginManager->createGroup('group'); } - /** - * @expectedException \Exception - * @expectedExceptionMessage No plugin implements createGroup in this LDAP Backend. - */ + public function testCreateGroupNotRegistered() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('No plugin implements createGroup in this LDAP Backend.'); + $pluginManager = $this->getGroupPluginManager(); $pluginManager->createGroup('foo'); } @@ -114,11 +114,11 @@ class GroupLDAPPluginTest extends \Test\TestCase { $pluginManager->deleteGroup('group'); } - /** - * @expectedException \Exception - * @expectedExceptionMessage No plugin implements deleteGroup in this LDAP Backend. - */ + public function testDeleteGroupNotRegistered() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('No plugin implements deleteGroup in this LDAP Backend.'); + $pluginManager = $this->getGroupPluginManager(); $pluginManager->deleteGroup('foo'); } @@ -145,11 +145,11 @@ class GroupLDAPPluginTest extends \Test\TestCase { $pluginManager->addToGroup('uid', 'gid'); } - /** - * @expectedException \Exception - * @expectedExceptionMessage No plugin implements addToGroup in this LDAP Backend. - */ + public function testAddToGroupNotRegistered() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('No plugin implements addToGroup in this LDAP Backend.'); + $pluginManager = $this->getGroupPluginManager(); $pluginManager->addToGroup('foo', 'bar'); } @@ -176,11 +176,11 @@ class GroupLDAPPluginTest extends \Test\TestCase { $pluginManager->removeFromGroup('uid', 'gid'); } - /** - * @expectedException \Exception - * @expectedExceptionMessage No plugin implements removeFromGroup in this LDAP Backend. - */ + public function testRemoveFromGroupNotRegistered() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('No plugin implements removeFromGroup in this LDAP Backend.'); + $pluginManager = $this->getGroupPluginManager(); $pluginManager->removeFromGroup('foo', 'bar'); } @@ -207,11 +207,11 @@ class GroupLDAPPluginTest extends \Test\TestCase { $pluginManager->countUsersInGroup('gid', 'search'); } - /** - * @expectedException \Exception - * @expectedExceptionMessage No plugin implements countUsersInGroup in this LDAP Backend. - */ + public function testCountUsersInGroupNotRegistered() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('No plugin implements countUsersInGroup in this LDAP Backend.'); + $pluginManager = $this->getGroupPluginManager(); $pluginManager->countUsersInGroup('foo', 'bar'); } @@ -237,11 +237,11 @@ class GroupLDAPPluginTest extends \Test\TestCase { $pluginManager->getGroupDetails('gid'); } - /** - * @expectedException \Exception - * @expectedExceptionMessage No plugin implements getGroupDetails in this LDAP Backend. - */ + public function testgetGroupDetailsNotRegistered() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('No plugin implements getGroupDetails in this LDAP Backend.'); + $pluginManager = $this->getGroupPluginManager(); $pluginManager->getGroupDetails('foo'); } |