Clear leftover shares from other tests
This commit is contained in:
parent
79ef54fe00
commit
4a225aa12c
|
@ -70,6 +70,8 @@ class DeleteOrphanedSharesJobTest extends \Test\TestCase {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
$this->connection = \OC::$server->getDatabaseConnection();
|
$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->user1 = $this->getUniqueID('user1_');
|
||||||
$this->user2 = $this->getUniqueID('user2_');
|
$this->user2 = $this->getUniqueID('user2_');
|
||||||
|
@ -84,7 +86,7 @@ class DeleteOrphanedSharesJobTest extends \Test\TestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function tearDown() {
|
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();
|
$userManager = \OC::$server->getUserManager();
|
||||||
$user1 = $userManager->get($this->user1);
|
$user1 = $userManager->get($this->user1);
|
||||||
|
|
Loading…
Reference in New Issue