summaryrefslogtreecommitdiffstats
path: root/apps/files_versions/tests
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_versions/tests')
-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/');