diff options
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'); } |