mirror of
https://github.com/nextcloud/server.git
synced 2024-07-29 08:15:55 +02:00
We have to mock the is_uploaded_file in the OC\Core\Controller namespace
This commit is contained in:
parent
09f4ce4389
commit
87ac72d004
@ -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;
|
||||
@ -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
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user