From 676fa459d79199d4d35edc971c663308428eef65 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Fri, 11 Jul 2014 14:27:43 +0200 Subject: [PATCH] Minor fixes * instanceof \OC\Files\View * fix misplaced paranthesis * remove misplaced character in comment --- apps/files_encryption/tests/util.php | 2 +- apps/files_sharing/tests/api.php | 6 ++++-- .../appframework/utility/controllermethodreflector.php | 1 + tests/lib/preferences-singleton.php | 3 ++- tests/lib/preferences.php | 1 + 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/apps/files_encryption/tests/util.php b/apps/files_encryption/tests/util.php index 3142b83c5a..d9fc819f98 100755 --- a/apps/files_encryption/tests/util.php +++ b/apps/files_encryption/tests/util.php @@ -249,7 +249,7 @@ class Test_Encryption_Util extends \PHPUnit_Framework_TestCase { } /** -< * Test that data that is read by the crypto stream wrapper + * Test that data that is read by the crypto stream wrapper */ function testGetFileSize() { \Test_Encryption_Util::loginHelper(\Test_Encryption_Util::TEST_ENCRYPTION_UTIL_USER1); diff --git a/apps/files_sharing/tests/api.php b/apps/files_sharing/tests/api.php index 49571d4c3c..fd3d25564b 100644 --- a/apps/files_sharing/tests/api.php +++ b/apps/files_sharing/tests/api.php @@ -52,8 +52,10 @@ class Test_Files_Sharing_Api extends Test_Files_Sharing_Base { } function tearDown() { - $this->view->unlink($this->filename); - $this->view->deleteAll($this->folder); + if($this->view instanceof \OC\Files\View) { + $this->view->unlink($this->filename); + $this->view->deleteAll($this->folder); + } self::$tempStorage = null; diff --git a/lib/private/appframework/utility/controllermethodreflector.php b/lib/private/appframework/utility/controllermethodreflector.php index d5cf2f52eb..c49dd80091 100644 --- a/lib/private/appframework/utility/controllermethodreflector.php +++ b/lib/private/appframework/utility/controllermethodreflector.php @@ -62,6 +62,7 @@ class ControllerMethodReflector { } else { $this->types = array_combine($matches['var'], $matches['type']); } + // get method parameters foreach ($reflection->getParameters() as $param) { if($param->isOptional()) { diff --git a/tests/lib/preferences-singleton.php b/tests/lib/preferences-singleton.php index 2fde089263..7abf5a6be3 100644 --- a/tests/lib/preferences-singleton.php +++ b/tests/lib/preferences-singleton.php @@ -61,7 +61,8 @@ class Test_Preferences extends PHPUnit_Framework_TestCase { sort($expected); $apps = \OC_Preferences::getApps('Someuser'); sort($apps); - $this->assertEquals($expected, $apps); } + $this->assertEquals($expected, $apps); + } public function testGetKeys() { $query = \OC_DB::prepare('SELECT DISTINCT `configkey` FROM `*PREFIX*preferences` WHERE `userid` = ? AND `appid` = ?'); diff --git a/tests/lib/preferences.php b/tests/lib/preferences.php index f2117ecb71..fe8e3e8b48 100644 --- a/tests/lib/preferences.php +++ b/tests/lib/preferences.php @@ -6,6 +6,7 @@ * later. * See the COPYING-README file. */ + class Test_Preferences_Object extends PHPUnit_Framework_TestCase { public function testGetUsers() {