diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2016-09-05 16:08:43 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-05 16:08:43 +0300 |
commit | 06fa48670699a4dc752c2cd44284ef6dc5da9e9f (patch) | |
tree | c30a8037c2d0de9d7d41a7ba2177e782eed292d5 /tests/Core | |
parent | 12736a359221cf9d6d4dc4c3aba83a545554b02e (diff) | |
parent | 6a85882f610ed34c971a1510f5876f0564fd7612 (diff) |
Merge pull request #1158 from nextcloud/cache_avatars
Cache avatars
Diffstat (limited to 'tests/Core')
-rw-r--r-- | tests/Core/Controller/AvatarControllerTest.php | 7 |
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 |