diff options
Diffstat (limited to 'apps/user_ldap/tests/Group_LDAPTest.php')
-rw-r--r-- | apps/user_ldap/tests/Group_LDAPTest.php | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/apps/user_ldap/tests/Group_LDAPTest.php b/apps/user_ldap/tests/Group_LDAPTest.php index e0ece5d50a6..2dae666d1dc 100644 --- a/apps/user_ldap/tests/Group_LDAPTest.php +++ b/apps/user_ldap/tests/Group_LDAPTest.php @@ -770,10 +770,10 @@ class Group_LDAPTest extends TestCase { $this->assertEquals($ldap->createGroup('gid'),true); } - /** - * @expectedException \Exception - */ + public function testCreateGroupFailing() { + $this->expectException(\Exception::class); + /** @var GroupPluginManager|\PHPUnit_Framework_MockObject_MockObject $pluginManager */ $pluginManager = $this->getMockBuilder('\OCA\User_LDAP\GroupPluginManager') ->setMethods(['implementsActions', 'createGroup']) @@ -825,10 +825,10 @@ class Group_LDAPTest extends TestCase { $this->assertEquals($ldap->deleteGroup('gid'),'result'); } - /** - * @expectedException \Exception - */ + public function testDeleteGroupFailing() { + $this->expectException(\Exception::class); + /** @var GroupPluginManager|\PHPUnit_Framework_MockObject_MockObject $pluginManager */ $pluginManager = $this->getMockBuilder('\OCA\User_LDAP\GroupPluginManager') ->setMethods(['implementsActions', 'deleteGroup']) @@ -871,10 +871,10 @@ class Group_LDAPTest extends TestCase { $this->assertEquals($ldap->addToGroup('uid', 'gid'),'result'); } - /** - * @expectedException \Exception - */ + public function testAddToGroupFailing() { + $this->expectException(\Exception::class); + /** @var GroupPluginManager|\PHPUnit_Framework_MockObject_MockObject $pluginManager */ $pluginManager = $this->getMockBuilder('\OCA\User_LDAP\GroupPluginManager') ->setMethods(['implementsActions', 'addToGroup']) @@ -917,10 +917,10 @@ class Group_LDAPTest extends TestCase { $this->assertEquals($ldap->removeFromGroup('uid', 'gid'),'result'); } - /** - * @expectedException \Exception - */ + public function testRemoveFromGroupFailing() { + $this->expectException(\Exception::class); + /** @var GroupPluginManager|\PHPUnit_Framework_MockObject_MockObject $pluginManager */ $pluginManager = $this->getMockBuilder('\OCA\User_LDAP\GroupPluginManager') ->setMethods(['implementsActions', 'removeFromGroup']) @@ -963,10 +963,10 @@ class Group_LDAPTest extends TestCase { $this->assertEquals($ldap->getGroupDetails('gid'),'result'); } - /** - * @expectedException \Exception - */ + public function testGetGroupDetailsFailing() { + $this->expectException(\Exception::class); + /** @var GroupPluginManager|\PHPUnit_Framework_MockObject_MockObject $pluginManager */ $pluginManager = $this->getMockBuilder('\OCA\User_LDAP\GroupPluginManager') ->setMethods(['implementsActions', 'getGroupDetails']) |