Skip to content
Snippets Groups Projects
Commit 7a6fd92f authored by Jakob Sack's avatar Jakob Sack
Browse files

Try to fix tests

parent 96ea8e14
No related branches found
No related tags found
No related merge requests found
......@@ -84,6 +84,8 @@ class AvatarService {
$copy->setUserId($avatar->getUserId());
$copy->setEmail($avatar->getEmail());
$copy->setSource($avatar->getSource());
$copy->setUpdatedAt($avatar->getUpdatedAt());
$copy->setUrl('');
if ($avatar->getSource() === 'addressbook') {
$result = $this->contactsIntegration->getPhoto($avatar->getEmail());
......
......@@ -48,6 +48,7 @@ class MessagesControllerTest extends PHPUnit_Framework_TestCase {
private $attachment;
private $mimeTypeDetector;
private $urlGenerator;
private $avatarService;
protected function setUp() {
parent::setUp();
......@@ -73,6 +74,9 @@ class MessagesControllerTest extends PHPUnit_Framework_TestCase {
$this->l10n = $this->getMockBuilder('\OCP\IL10N')->getMock();
$this->mimeTypeDetector = $this->getMockBuilder('OCP\Files\IMimeTypeDetector')->getMock();
$this->urlGenerator = $this->getMockBuilder('\OCP\IURLGenerator')->getMock();
$this->avatarService = $this->getMockBuilder('\OCA\Mail\Service\AvatarService')
->disableOriginalConstructor()
->getMock();
$this->controller = new MessagesController(
$this->appName,
......@@ -84,7 +88,8 @@ class MessagesControllerTest extends PHPUnit_Framework_TestCase {
$this->logger,
$this->l10n,
$this->mimeTypeDetector,
$this->urlGenerator);
$this->urlGenerator,
$this->avatarService);
$this->account = $this->getMockBuilder('\OCA\Mail\Account')
->disableOriginalConstructor()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment