aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/files
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2013-06-10 09:31:22 +0200
committerJörn Friedrich Dreyer <jfd@butonic.de>2013-06-10 09:31:22 +0200
commit73fb722a9e34dccc428bbf38adf40657ac98c94e (patch)
tree06848692b089586cd56f3807c4023f3b2dda36cb /tests/lib/files
parentb237d0379162b52269a6ea8292165d448d075f46 (diff)
downloadnextcloud-server-73fb722a9e34dccc428bbf38adf40657ac98c94e.tar.gz
nextcloud-server-73fb722a9e34dccc428bbf38adf40657ac98c94e.zip
add timeouts 3/30/90 to phpunit tests
Diffstat (limited to 'tests/lib/files')
-rw-r--r--tests/lib/files/cache/watcher.php3
-rw-r--r--tests/lib/files/view.php24
2 files changed, 27 insertions, 0 deletions
diff --git a/tests/lib/files/cache/watcher.php b/tests/lib/files/cache/watcher.php
index e43c86ed438..d9301a903cb 100644
--- a/tests/lib/files/cache/watcher.php
+++ b/tests/lib/files/cache/watcher.php
@@ -63,6 +63,9 @@ class Watcher extends \PHPUnit_Framework_TestCase {
$this->assertFalse($cache->inCache('folder/bar2.txt'));
}
+ /**
+ * @medium
+ */
public function testFileToFolder() {
$storage = $this->getTestStorage();
$cache = $storage->getCache();
diff --git a/tests/lib/files/view.php b/tests/lib/files/view.php
index 01f9a9cca11..830913a91ad 100644
--- a/tests/lib/files/view.php
+++ b/tests/lib/files/view.php
@@ -33,6 +33,9 @@ class View extends \PHPUnit_Framework_TestCase {
}
}
+ /**
+ * @medium
+ */
public function testCacheAPI() {
$storage1 = $this->getTestStorage();
$storage2 = $this->getTestStorage();
@@ -104,6 +107,9 @@ class View extends \PHPUnit_Framework_TestCase {
$this->assertEquals(array(), $rootView->getDirectoryContent('/non/existing'));
}
+ /**
+ * @medium
+ */
function testGetPath() {
$storage1 = $this->getTestStorage();
$storage2 = $this->getTestStorage();
@@ -127,6 +133,9 @@ class View extends \PHPUnit_Framework_TestCase {
$this->assertNull($folderView->getPath($id1));
}
+ /**
+ * @medium
+ */
function testMountPointOverwrite() {
$storage1 = $this->getTestStorage(false);
$storage2 = $this->getTestStorage();
@@ -170,6 +179,9 @@ class View extends \PHPUnit_Framework_TestCase {
$this->assertEquals($textSize, $folderData[0]['size']);
}
+ /**
+ * @medium
+ */
function testSearch() {
$storage1 = $this->getTestStorage();
$storage2 = $this->getTestStorage();
@@ -217,6 +229,9 @@ class View extends \PHPUnit_Framework_TestCase {
$this->assertEquals(3, count($folderView->searchByMime('text')));
}
+ /**
+ * @medium
+ */
function testWatcher() {
$storage1 = $this->getTestStorage();
\OC\Files\Filesystem::mount($storage1, array(), '/');
@@ -234,6 +249,9 @@ class View extends \PHPUnit_Framework_TestCase {
$this->assertEquals(3, $cachedData['size']);
}
+ /**
+ * @medium
+ */
function testCopyBetweenStorages() {
$storage1 = $this->getTestStorage();
$storage2 = $this->getTestStorage();
@@ -255,6 +273,9 @@ class View extends \PHPUnit_Framework_TestCase {
$this->assertTrue($rootView->file_exists('/substorage/folder/bar.txt'));
}
+ /**
+ * @medium
+ */
function testMoveBetweenStorages() {
$storage1 = $this->getTestStorage();
$storage2 = $this->getTestStorage();
@@ -271,6 +292,9 @@ class View extends \PHPUnit_Framework_TestCase {
$this->assertTrue($rootView->file_exists('anotherfolder/bar.txt'));
}
+ /**
+ * @medium
+ */
function testTouch() {
$storage = $this->getTestStorage(true, '\Test\Files\TemporaryNoTouch');