Merge pull request #14995 from owncloud/remove-unrequired-backtick-removal
Remove unrequired backtick removal
This commit is contained in:
commit
fe8002a7db
|
@ -245,9 +245,6 @@ class Cache {
|
||||||
$queryParts[] = '`storage`';
|
$queryParts[] = '`storage`';
|
||||||
$params[] = $this->getNumericStorageId();
|
$params[] = $this->getNumericStorageId();
|
||||||
|
|
||||||
$params = array_map(function($item) {
|
|
||||||
return trim($item, "`");
|
|
||||||
}, $params);
|
|
||||||
$queryParts = array_map(function($item) {
|
$queryParts = array_map(function($item) {
|
||||||
return trim($item, "`");
|
return trim($item, "`");
|
||||||
}, $queryParts);
|
}, $queryParts);
|
||||||
|
|
|
@ -260,6 +260,28 @@ class Cache extends \Test\TestCase {
|
||||||
$this->assertEquals(\OC\Files\Cache\Cache::COMPLETE, $this->cache->getStatus('foo'));
|
$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() {
|
function testSearch() {
|
||||||
$file1 = 'folder';
|
$file1 = 'folder';
|
||||||
$file2 = 'folder/foobar';
|
$file2 = 'folder/foobar';
|
||||||
|
|
Loading…
Reference in New Issue