aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2015-03-18 19:34:49 +0100
committerVincent Petry <pvince81@owncloud.com>2015-03-18 19:34:49 +0100
commitfe8002a7db0ccfec3a96def4f889c265b52ace53 (patch)
treed8b3057501700323433c87b28571ac559ee846fa /tests/lib
parentbd57fcb539bedb4bd7d8823c65e4b68138b615b0 (diff)
parentf2f7f178a5dcf3c5cfbc7509692d47cca4a658f3 (diff)
downloadnextcloud-server-fe8002a7db0ccfec3a96def4f889c265b52ace53.tar.gz
nextcloud-server-fe8002a7db0ccfec3a96def4f889c265b52ace53.zip
Merge pull request #14995 from owncloud/remove-unrequired-backtick-removal
Remove unrequired backtick removal
Diffstat (limited to 'tests/lib')
-rw-r--r--tests/lib/files/cache/cache.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/lib/files/cache/cache.php b/tests/lib/files/cache/cache.php
index 15bcff24f36..1bf838351b6 100644
--- a/tests/lib/files/cache/cache.php
+++ b/tests/lib/files/cache/cache.php
@@ -260,6 +260,28 @@ class Cache extends \Test\TestCase {
$this->assertEquals(\OC\Files\Cache\Cache::COMPLETE, $this->cache->getStatus('foo'));
}
+ public function putWithAllKindOfQuotesData() {
+ return [
+ ['`backtick`'],
+ ['´forward´'],
+ ['\'single\''],
+ ];
+ }
+
+ /**
+ * @dataProvider putWithAllKindOfQuotesData
+ * @param $fileName
+ */
+ public function testPutWithAllKindOfQuotes($fileName) {
+
+ $this->assertEquals(\OC\Files\Cache\Cache::NOT_FOUND, $this->cache->get($fileName));
+ $this->cache->put($fileName, array('size' => 20, 'mtime' => 25, 'mimetype' => 'foo/file', 'etag' => $fileName));
+
+ $cacheEntry = $this->cache->get($fileName);
+ $this->assertEquals($fileName, $cacheEntry['etag']);
+ $this->assertEquals($fileName, $cacheEntry['path']);
+ }
+
function testSearch() {
$file1 = 'folder';
$file2 = 'folder/foobar';