Add proper group setup and teardown to all provisioning_api tests

This commit is contained in:
Tom Needham 2015-01-03 15:58:36 +00:00
parent 5c0d7f2ee5
commit a20de1548d
3 changed files with 9 additions and 0 deletions

View file

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

View file

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

View file

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