summaryrefslogtreecommitdiffstats
path: root/apps/files_versions/tests/versions.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_versions/tests/versions.php')
-rw-r--r--apps/files_versions/tests/versions.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/apps/files_versions/tests/versions.php b/apps/files_versions/tests/versions.php
index 636a0eec984..6852f769a3d 100644
--- a/apps/files_versions/tests/versions.php
+++ b/apps/files_versions/tests/versions.php
@@ -246,6 +246,8 @@ class Test_Files_Versioning extends \Test\TestCase {
// execute rename hook of versions app
\OC\Files\Filesystem::rename("test.txt", "test2.txt");
+ $this->runCommands();
+
$this->assertFalse($this->rootView->file_exists($v1));
$this->assertFalse($this->rootView->file_exists($v2));
@@ -288,8 +290,11 @@ class Test_Files_Versioning extends \Test\TestCase {
// execute rename hook of versions app
\OC\Files\Filesystem::rename('/folder1/test.txt', '/folder1/folder2/test.txt');
+
self::loginHelper(self::TEST_VERSIONS_USER2);
+ $this->runCommands();
+
$this->assertFalse($this->rootView->file_exists($v1));
$this->assertFalse($this->rootView->file_exists($v2));
@@ -333,6 +338,8 @@ class Test_Files_Versioning extends \Test\TestCase {
self::loginHelper(self::TEST_VERSIONS_USER);
+ $this->runCommands();
+
$this->assertTrue($this->rootView->file_exists($v1));
$this->assertTrue($this->rootView->file_exists($v2));
@@ -364,6 +371,8 @@ class Test_Files_Versioning extends \Test\TestCase {
// execute copy hook of versions app
\OC\Files\Filesystem::copy("test.txt", "test2.txt");
+ $this->runCommands();
+
$this->assertTrue($this->rootView->file_exists($v1));
$this->assertTrue($this->rootView->file_exists($v2));
@@ -417,7 +426,9 @@ class Test_Files_Versioning extends \Test\TestCase {
public static function loginHelper($user, $create = false) {
if ($create) {
- \OC_User::createUser($user, $user);
+ $backend = new \OC_User_Dummy();
+ $backend->createUser($user, $user);
+ \OC::$server->getUserManager()->registerBackend($backend);
}
\OC_Util::tearDownFS();