diff options
author | Robin Appelman <icewind@owncloud.com> | 2016-01-13 15:29:53 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2016-01-20 16:32:56 +0100 |
commit | 483c6b68e2797a4608f5ff519ba961facdf8e9e4 (patch) | |
tree | d804635a0969b2431dfe4b1418bc8412ebab7880 /apps/files_external/tests | |
parent | bc7bd0cd0532b8309d317c23ee4f13106e0a0e1d (diff) | |
download | nextcloud-server-483c6b68e2797a4608f5ff519ba961facdf8e9e4.tar.gz nextcloud-server-483c6b68e2797a4608f5ff519ba961facdf8e9e4.zip |
clear mount cache when removing applicables
Diffstat (limited to 'apps/files_external/tests')
4 files changed, 12 insertions, 4 deletions
diff --git a/apps/files_external/tests/service/globalstoragesservicetest.php b/apps/files_external/tests/service/globalstoragesservicetest.php index 7fc60efca08..6cdfbef82d4 100644 --- a/apps/files_external/tests/service/globalstoragesservicetest.php +++ b/apps/files_external/tests/service/globalstoragesservicetest.php @@ -34,7 +34,7 @@ use \OCA\Files_external\Lib\StorageConfig; class GlobalStoragesServiceTest extends StoragesServiceTest { public function setUp() { parent::setUp(); - $this->service = new GlobalStoragesService($this->backendService, $this->dbConfig); + $this->service = new GlobalStoragesService($this->backendService, $this->dbConfig, $this->mountCache); } public function tearDown() { diff --git a/apps/files_external/tests/service/storagesservicetest.php b/apps/files_external/tests/service/storagesservicetest.php index 710d804fd39..68671b599bd 100644 --- a/apps/files_external/tests/service/storagesservicetest.php +++ b/apps/files_external/tests/service/storagesservicetest.php @@ -76,6 +76,11 @@ abstract class StoragesServiceTest extends \Test\TestCase { */ protected static $hookCalls; + /** + * @var \PHPUnit_Framework_MockObject_MockObject|\OCP\Files\Config\IUserMountCache + */ + protected $mountCache; + public function setUp() { parent::setUp(); $this->dbConfig = new CleaningDBConfig(\OC::$server->getDatabaseConnection()); @@ -87,6 +92,8 @@ abstract class StoragesServiceTest extends \Test\TestCase { ); \OC_Mount_Config::$skipTest = true; + $this->mountCache = $this->getMock('OCP\Files\Config\IUserMountCache'); + // prepare BackendService mock $this->backendService = $this->getMockBuilder('\OCA\Files_External\Service\BackendService') diff --git a/apps/files_external/tests/service/userglobalstoragesservicetest.php b/apps/files_external/tests/service/userglobalstoragesservicetest.php index a22e2874073..baecf143c66 100644 --- a/apps/files_external/tests/service/userglobalstoragesservicetest.php +++ b/apps/files_external/tests/service/userglobalstoragesservicetest.php @@ -94,7 +94,8 @@ class UserGlobalStoragesServiceTest extends GlobalStoragesServiceTest { $this->backendService, $this->dbConfig, $userSession, - $this->groupManager + $this->groupManager, + $this->mountCache ); } diff --git a/apps/files_external/tests/service/userstoragesservicetest.php b/apps/files_external/tests/service/userstoragesservicetest.php index bf0efc13cf5..37423cb8d74 100644 --- a/apps/files_external/tests/service/userstoragesservicetest.php +++ b/apps/files_external/tests/service/userstoragesservicetest.php @@ -49,7 +49,7 @@ class UserStoragesServiceTest extends StoragesServiceTest { public function setUp() { parent::setUp(); - $this->globalStoragesService = new GlobalStoragesService($this->backendService, $this->dbConfig); + $this->globalStoragesService = new GlobalStoragesService($this->backendService, $this->dbConfig, $this->mountCache); $this->userId = $this->getUniqueID('user_'); $this->createUser($this->userId, $this->userId); @@ -62,7 +62,7 @@ class UserStoragesServiceTest extends StoragesServiceTest { ->method('getUser') ->will($this->returnValue($this->user)); - $this->service = new UserStoragesService($this->backendService, $this->dbConfig, $userSession); + $this->service = new UserStoragesService($this->backendService, $this->dbConfig, $userSession, $this->mountCache); } private function makeTestStorageData() { |