Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2016-08-29 16:17:59 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2016-08-30 10:00:22 +0300
commit6a85882f610ed34c971a1510f5876f0564fd7612 (patch)
treea0d114b0e450f7b35d9eeb423171d4e7fe3d6767 /tests/Core
parent14136295b7568c6e34504c101eba0ee10f5c74fd (diff)
Fix tests
Diffstat (limited to 'tests/Core')
-rw-r--r--tests/Core/Controller/AvatarControllerTest.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/Core/Controller/AvatarControllerTest.php b/tests/Core/Controller/AvatarControllerTest.php
index fe1a44b28ab..af75c4bb751 100644
--- a/tests/Core/Controller/AvatarControllerTest.php
+++ b/tests/Core/Controller/AvatarControllerTest.php
@@ -31,6 +31,7 @@ function is_uploaded_file($filename) {
namespace Tests\Core\Controller;
+use OC\AppFramework\Utility\TimeFactory;
use OC\Core\Controller\AvatarController;
use OCP\AppFramework\Http;
use OCP\Files\Cache\ICache;
@@ -74,6 +75,8 @@ class AvatarControllerTest extends \Test\TestCase {
private $logger;
/** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */
private $request;
+ /** @var TimeFactory|\PHPUnit_Framework_MockObject_MockObject */
+ private $timeFactory;
protected function setUp() {
parent::setUp();
@@ -87,6 +90,7 @@ class AvatarControllerTest extends \Test\TestCase {
$this->request = $this->getMockBuilder('OCP\IRequest')->getMock();
$this->rootFolder = $this->getMockBuilder('OCP\Files\IRootFolder')->getMock();
$this->logger = $this->getMockBuilder('OCP\ILogger')->getMock();
+ $this->timeFactory = $this->getMockBuilder('OC\AppFramework\Utility\TimeFactory')->getMock();
$this->avatarMock = $this->getMockBuilder('OCP\IAvatar')->getMock();
$this->userMock = $this->getMockBuilder('OCP\IUser')->getMock();
@@ -100,7 +104,8 @@ class AvatarControllerTest extends \Test\TestCase {
$this->userManager,
$this->rootFolder,
$this->logger,
- 'userid'
+ 'userid',
+ $this->timeFactory
);
// Configure userMock