Add proper group setup and teardown to all provisioning_api tests
This commit is contained in:
parent
5c0d7f2ee5
commit
a20de1548d
3 changed files with 9 additions and 0 deletions
|
@ -27,6 +27,9 @@ class Test_Provisioning_Api_Apps extends PHPUnit_Framework_TestCase {
|
|||
|
||||
private $users = array();
|
||||
|
||||
function setUp() {
|
||||
OC_Group::createGroup('admin');
|
||||
}
|
||||
/**
|
||||
* Generates a temp user
|
||||
* @param $num int number of users to generate
|
||||
|
@ -98,4 +101,8 @@ class Test_Provisioning_Api_Apps extends PHPUnit_Framework_TestCase {
|
|||
|
||||
}
|
||||
|
||||
function tearDown() {
|
||||
OC_Group::deleteGroup('admin');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -167,6 +167,7 @@ class Test_Provisioning_Api_Groups extends PHPUnit_Framework_TestCase {
|
|||
foreach($this->users as $user) {
|
||||
\OC_User::deleteUser($user);
|
||||
}
|
||||
OC_Group::deleteGroup('admin');
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -793,6 +793,7 @@ class Test_Provisioning_Api_Users extends PHPUnit_Framework_TestCase {
|
|||
foreach($this->users as $user) {
|
||||
\OC_User::deleteUser($user);
|
||||
}
|
||||
OC_Group::deleteGroup('admin');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue