Clear leftover shares from other tests

This commit is contained in:
Vincent Petry 2015-04-10 13:43:57 +02:00
parent 79ef54fe00
commit 4a225aa12c
1 changed files with 3 additions and 1 deletions

View File

@ -70,6 +70,8 @@ class DeleteOrphanedSharesJobTest extends \Test\TestCase {
parent::setUp();
$this->connection = \OC::$server->getDatabaseConnection();
// clear occasional leftover shares from other tests
$this->connection->executeUpdate('DELETE FROM `*PREFIX*share`');
$this->user1 = $this->getUniqueID('user1_');
$this->user2 = $this->getUniqueID('user2_');
@ -84,7 +86,7 @@ class DeleteOrphanedSharesJobTest extends \Test\TestCase {
}
protected function tearDown() {
$this->connection->executeUpdate('DELETE FROM `*PREFIX*share` WHERE `item_type` in (\'file\', \'folder\')');
$this->connection->executeUpdate('DELETE FROM `*PREFIX*share`');
$userManager = \OC::$server->getUserManager();
$user1 = $userManager->get($this->user1);