aboutsummaryrefslogtreecommitdiffstats
path: root/tests/Core
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2016-08-15 20:08:20 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2016-08-15 20:08:20 +0200
commit87ac72d004b318c4b90c93f303575ba19f5b9cd9 (patch)
tree769a92cf90c11928461c3a814f14806606cb472f /tests/Core
parent09f4ce43890f62f682c08594ed464f7f1ec7eaac (diff)
downloadnextcloud-server-87ac72d004b318c4b90c93f303575ba19f5b9cd9.tar.gz
nextcloud-server-87ac72d004b318c4b90c93f303575ba19f5b9cd9.zip
We have to mock the is_uploaded_file in the OC\Core\Controller namespace
Diffstat (limited to 'tests/Core')
-rw-r--r--tests/Core/Controller/AvatarControllerTest.php18
1 files changed, 10 insertions, 8 deletions
diff --git a/tests/Core/Controller/AvatarControllerTest.php b/tests/Core/Controller/AvatarControllerTest.php
index 4a7b7f21784..d45d0618230 100644
--- a/tests/Core/Controller/AvatarControllerTest.php
+++ b/tests/Core/Controller/AvatarControllerTest.php
@@ -19,6 +19,16 @@
*
*/
+namespace OC\Core\Controller;
+
+/**
+ * Overwrite is_uploaded_file in the OC\Core\Controller namespace to allow
+ * proper unit testing of the postAvatar call.
+ */
+function is_uploaded_file($filename) {
+ return file_exists($filename);
+}
+
namespace Tests\Core\Controller;
use OC\Core\Application;
@@ -32,14 +42,6 @@ use Punic\Exception;
use Test\Traits\UserTrait;
/**
- * Overwrite is_uploaded_file in this namespace to allow proper unit testing of
- * the postAvatar call.
- */
-function is_uploaded_file($filename) {
- return file_exists($filename);
-}
-
-/**
* Class AvatarControllerTest
*
* @group DB