Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorThomas Mueller <thomas.mueller@tmit.eu>2013-02-15 20:40:52 +0400
committerThomas Mueller <thomas.mueller@tmit.eu>2013-02-15 20:40:52 +0400
commit191da024fa312c6322c00073c6cf48dc8e282ed0 (patch)
tree98dd7513d6b175749ac4e40c60bb1392000f128d /tests
parentc0f3d8578a48ceee1a45fda4077696643747fc45 (diff)
new test cases added to search in sub folders
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/files/storage/storage.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/lib/files/storage/storage.php b/tests/lib/files/storage/storage.php
index c74a16f509f..f78f66d8b8a 100644
--- a/tests/lib/files/storage/storage.php
+++ b/tests/lib/files/storage/storage.php
@@ -223,6 +223,22 @@ abstract class Storage extends \PHPUnit_Framework_TestCase {
$this->assertContains('/logo-wide.png', $result);
}
+ public function testSearchInSubFolder() {
+ $this->instance->mkdir('sub')
+ ;
+ $textFile = \OC::$SERVERROOT . '/tests/data/lorem.txt';
+ $this->instance->file_put_contents('/sub/lorem.txt', file_get_contents($textFile, 'r'));
+ $pngFile = \OC::$SERVERROOT . '/tests/data/logo-wide.png';
+ $this->instance->file_put_contents('/sub/logo-wide.png', file_get_contents($pngFile, 'r'));
+ $svgFile = \OC::$SERVERROOT . '/tests/data/logo-wide.svg';
+ $this->instance->file_put_contents('/sub/logo-wide.svg', file_get_contents($svgFile, 'r'));
+
+ $result = $this->instance->search('logo');
+ $this->assertEquals(2, count($result));
+ $this->assertContains('/sub/logo-wide.svg', $result);
+ $this->assertContains('/sub/logo-wide.png', $result);
+ }
+
public function testFOpen() {
$textFile = \OC::$SERVERROOT . '/tests/data/lorem.txt';