]> source.dussan.org Git - nextcloud-server.git/commitdiff
We have to mock the is_uploaded_file in the OC\Core\Controller namespace 884/head
authorRoeland Jago Douma <roeland@famdouma.nl>
Mon, 15 Aug 2016 18:08:20 +0000 (20:08 +0200)
committerRoeland Jago Douma <roeland@famdouma.nl>
Mon, 15 Aug 2016 18:09:48 +0000 (20:09 +0200)
tests/Core/Controller/AvatarControllerTest.php

index 4a7b7f21784d05008af1d89142bcca8e292f1e0c..d45d0618230d2db0318f231ba7317eaebbaf3736 100644 (file)
  *
  */
 
+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;
@@ -31,14 +41,6 @@ use OCP\IAvatar;
 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
  *