From 43588fe2f78ff00586a45de9cbbadcadeaa03c4b Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Thu, 26 Mar 2015 12:15:02 +0100 Subject: Properly quote file names in listFiles query for GDrive --- tests/lib/files/storage/storage.php | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) (limited to 'tests') 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) { -- cgit v1.2.3