summaryrefslogtreecommitdiffstats
path: root/apps/files_versions
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2016-02-19 14:29:01 +0100
committerRobin Appelman <icewind@owncloud.com>2016-03-23 17:13:28 +0100
commit24670b4218032a32b0cb83ce9d108eaa455c1ec6 (patch)
tree708222ac2612bf7f920d1ec0050dc61c02d2f579 /apps/files_versions
parentc864420d6c822bae1e019f71f414d7a738e8f9be (diff)
downloadnextcloud-server-24670b4218032a32b0cb83ce9d108eaa455c1ec6.tar.gz
nextcloud-server-24670b4218032a32b0cb83ce9d108eaa455c1ec6.zip
set watch policy in test
Diffstat (limited to 'apps/files_versions')
-rw-r--r--apps/files_versions/tests/versions.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/apps/files_versions/tests/versions.php b/apps/files_versions/tests/versions.php
index e82e65bf3a5..f6658e092bd 100644
--- a/apps/files_versions/tests/versions.php
+++ b/apps/files_versions/tests/versions.php
@@ -74,6 +74,19 @@ class Test_Files_Versioning extends \Test\TestCase {
protected function setUp() {
parent::setUp();
+ $config = \OC::$server->getConfig();
+ $mockConfig = $this->getMock('\OCP\IConfig');
+ $mockConfig->expects($this->any())
+ ->method('getSystemValue')
+ ->will($this->returnCallback(function ($key, $default) use ($config) {
+ if ($key === 'filesystem_check_changes') {
+ return \OC\Files\Cache\Watcher::CHECK_ONCE;
+ } else {
+ return $config->getSystemValue($key, $default);
+ }
+ }));
+ $this->overwriteService('AllConfig', $mockConfig);
+
// clear hooks
\OC_Hook::clear();
\OC::registerShareHooks();
@@ -87,6 +100,8 @@ class Test_Files_Versioning extends \Test\TestCase {
}
protected function tearDown() {
+ $this->restoreService('AllConfig');
+
if ($this->rootView) {
$this->rootView->deleteAll(self::TEST_VERSIONS_USER . '/files/');
$this->rootView->deleteAll(self::TEST_VERSIONS_USER2 . '/files/');