summaryrefslogtreecommitdiffstats
path: root/tests/lib
diff options
context:
space:
mode:
authorFrank Karlitschek <karlitschek@gmx.de>2015-03-31 09:08:59 -0400
committerFrank Karlitschek <karlitschek@gmx.de>2015-03-31 09:08:59 -0400
commitb216b3fad0517b706457f74597b1ec7a7772a2b3 (patch)
tree1ed3e2f6dfecbc86069876ed0d4ab4a83e95e8ed /tests/lib
parent1d06d93d271210793baf575414ff0dd8f576dae0 (diff)
parent534892d45646ca9c90be9b2632dc25dc21f9038d (diff)
downloadnextcloud-server-b216b3fad0517b706457f74597b1ec7a7772a2b3.tar.gz
nextcloud-server-b216b3fad0517b706457f74597b1ec7a7772a2b3.zip
Merge pull request #15215 from owncloud/ext-gdrivelistfilequoting
Properly quote file names in listFiles query for GDrive
Diffstat (limited to 'tests/lib')
-rw-r--r--tests/lib/files/storage/storage.php34
1 files changed, 18 insertions, 16 deletions
diff --git a/tests/lib/files/storage/storage.php b/tests/lib/files/storage/storage.php
index 30f403d60df..ad7522f1ea8 100644
--- a/tests/lib/files/storage/storage.php
+++ b/tests/lib/files/storage/storage.php
@@ -104,13 +104,14 @@ abstract class Storage extends \Test\TestCase {
}
public function directoryProvider() {
- return array(
- array('folder'),
- array(' folder'),
- array('folder '),
- array('folder with space'),
- array('spéciäl földer'),
- );
+ return [
+ ['folder'],
+ [' folder'],
+ ['folder '],
+ ['folder with space'],
+ ['spéciäl földer'],
+ ['test single\'quote'],
+ ];
}
function loremFileProvider() {
@@ -163,15 +164,16 @@ abstract class Storage extends \Test\TestCase {
public function copyAndMoveProvider() {
- return array(
- array('/source.txt', '/target.txt'),
- array('/source.txt', '/target with space.txt'),
- array('/source with space.txt', '/target.txt'),
- array('/source with space.txt', '/target with space.txt'),
- array('/source.txt', '/tärgét.txt'),
- array('/sòurcē.txt', '/target.txt'),
- array('/sòurcē.txt', '/tärgét.txt'),
- );
+ return [
+ ['/source.txt', '/target.txt'],
+ ['/source.txt', '/target with space.txt'],
+ ['/source with space.txt', '/target.txt'],
+ ['/source with space.txt', '/target with space.txt'],
+ ['/source.txt', '/tärgét.txt'],
+ ['/sòurcē.txt', '/target.txt'],
+ ['/sòurcē.txt', '/tärgét.txt'],
+ ['/single \' quote.txt', '/tar\'get.txt'],
+ ];
}
public function initSourceAndTarget ($source, $target = null) {