diff options
-rw-r--r-- | lib/private/Repair/Owncloud/SaveAccountsTableData.php | 19 | ||||
-rw-r--r-- | lib/private/Server.php | 6 | ||||
-rw-r--r-- | lib/private/Share20/Manager.php | 26 | ||||
-rw-r--r-- | lib/public/Mail/IEMailTemplate.php | 2 | ||||
-rw-r--r-- | settings/Mailer/NewUserMailHelper.php | 2 | ||||
-rw-r--r-- | settings/templates/settings/frame.php | 4 | ||||
-rw-r--r-- | tests/Settings/Mailer/NewUserMailHelperTest.php | 8 | ||||
-rw-r--r-- | tests/data/emails/new-account-email-custom-text-alternative.txt | 2 | ||||
-rw-r--r-- | tests/data/emails/new-account-email-custom.html | 2 | ||||
-rw-r--r-- | tests/data/emails/new-account-email-custom.txt | 2 | ||||
-rw-r--r-- | tests/data/emails/new-account-email-single-button.html | 2 | ||||
-rw-r--r-- | tests/data/emails/new-account-email-single-button.txt | 2 | ||||
-rw-r--r-- | tests/data/emails/new-account-email.html | 2 | ||||
-rw-r--r-- | tests/data/emails/new-account-email.txt | 2 | ||||
-rw-r--r-- | tests/lib/Mail/EMailTemplateTest.php | 8 | ||||
-rw-r--r-- | tests/lib/Share20/ManagerTest.php | 11 |
16 files changed, 56 insertions, 44 deletions
diff --git a/lib/private/Repair/Owncloud/SaveAccountsTableData.php b/lib/private/Repair/Owncloud/SaveAccountsTableData.php index ae56004020d..c9e67356fb9 100644 --- a/lib/private/Repair/Owncloud/SaveAccountsTableData.php +++ b/lib/private/Repair/Owncloud/SaveAccountsTableData.php @@ -23,8 +23,6 @@ namespace OC\Repair\Owncloud; -use Doctrine\DBAL\Exception\InvalidFieldNameException; -use Doctrine\DBAL\Exception\TableNotFoundException; use OCP\DB\QueryBuilder\IQueryBuilder; use OCP\IConfig; use OCP\IDBConnection; @@ -86,20 +84,15 @@ class SaveAccountsTableData implements IRepairStep { * @return bool */ protected function shouldRun() { - $query = $this->db->getQueryBuilder(); - $query->select('*') - ->from('accounts') - ->where($query->expr()->isNotNull('user_id')) - ->setMaxResults(1); + $schema = $this->db->createSchema(); - try { - $query->execute(); - return true; - } catch (InvalidFieldNameException $e) { - return false; - } catch (TableNotFoundException $e) { + $tableName = $this->config->getSystemValue('dbtableprefix', 'oc_') . 'accounts'; + if (!$schema->hasTable($tableName)) { return false; } + + $table = $schema->getTable($tableName); + return $table->hasColumn('user_id'); } /** diff --git a/lib/private/Server.php b/lib/private/Server.php index 3a4fac175e8..fb0aa76cd17 100644 --- a/lib/private/Server.php +++ b/lib/private/Server.php @@ -55,8 +55,6 @@ use OC\Authentication\LoginCredentials\Store; use OC\Command\CronBus; use OC\Contacts\ContactsMenu\ActionFactory; use OC\Diagnostics\EventLogger; -use OC\Diagnostics\NullEventLogger; -use OC\Diagnostics\NullQueryLogger; use OC\Diagnostics\QueryLogger; use OC\Federation\CloudIdManager; use OC\Files\Config\UserMountCache; @@ -114,7 +112,6 @@ use OCP\IL10N; use OCP\IServerContainer; use OCP\ITempManager; use OCP\Contacts\ContactsMenu\IActionFactory; -use OCP\IURLGenerator; use OCP\Lock\ILockingProvider; use OCP\RichObjectStrings\IValidator; use OCP\Security\IContentSecurityPolicyManager; @@ -980,7 +977,8 @@ class Server extends ServerContainer implements IServerContainer { $c->getHasher(), $c->getMountManager(), $c->getGroupManager(), - $c->getL10N('core'), + $c->getL10N('lib'), + $c->getL10NFactory(), $factory, $c->getUserManager(), $c->getLazyRootFolder(), diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php index 886a319b1e7..6546fc48141 100644 --- a/lib/private/Share20/Manager.php +++ b/lib/private/Share20/Manager.php @@ -31,7 +31,6 @@ use OC\Cache\CappedMemoryCache; use OC\Files\Mount\MoveableMount; use OC\HintException; use OC\Share20\Exception\ProviderException; -use OCP\Defaults; use OCP\Files\File; use OCP\Files\Folder; use OCP\Files\IRootFolder; @@ -44,6 +43,7 @@ use OCP\ILogger; use OCP\IURLGenerator; use OCP\IUser; use OCP\IUserManager; +use OCP\L10N\IFactory; use OCP\Mail\IMailer; use OCP\Security\IHasher; use OCP\Security\ISecureRandom; @@ -76,6 +76,8 @@ class Manager implements IManager { private $groupManager; /** @var IL10N */ private $l; + /** @var IFactory */ + private $l10nFactory; /** @var IUserManager */ private $userManager; /** @var IRootFolder */ @@ -104,6 +106,7 @@ class Manager implements IManager { * @param IMountManager $mountManager * @param IGroupManager $groupManager * @param IL10N $l + * @param IFactory $l10nFactory * @param IProviderFactory $factory * @param IUserManager $userManager * @param IRootFolder $rootFolder @@ -120,6 +123,7 @@ class Manager implements IManager { IMountManager $mountManager, IGroupManager $groupManager, IL10N $l, + IFactory $l10nFactory, IProviderFactory $factory, IUserManager $userManager, IRootFolder $rootFolder, @@ -135,6 +139,7 @@ class Manager implements IManager { $this->mountManager = $mountManager; $this->groupManager = $groupManager; $this->l = $l; + $this->l10nFactory = $l10nFactory; $this->factory = $factory; $this->userManager = $userManager; $this->rootFolder = $rootFolder; @@ -658,7 +663,10 @@ class Manager implements IManager { if ($user !== null) { $emailAddress = $user->getEMailAddress(); if ($emailAddress !== null && $emailAddress !== '') { + $userLang = $this->config->getUserValue($share->getSharedWith(), 'core', 'lang', null); + $l = $this->l10nFactory->get('lib', $userLang); $this->sendMailNotification( + $l, $share->getNode()->getName(), $this->urlGenerator->linkToRouteAbsolute('files.viewcontroller.showFile', [ 'fileid' => $share->getNode()->getId() ]), $share->getSharedBy(), @@ -678,6 +686,7 @@ class Manager implements IManager { } /** + * @param IL10N $l Language of the recipient * @param string $filename file/folder name * @param string $link link to the file/folder * @param string $initiator user ID of share sender @@ -685,14 +694,15 @@ class Manager implements IManager { * @param \DateTime|null $expiration * @throws \Exception If mail couldn't be sent */ - protected function sendMailNotification($filename, + protected function sendMailNotification(IL10N $l, + $filename, $link, $initiator, $shareWith, \DateTime $expiration = null) { $initiatorUser = $this->userManager->get($initiator); $initiatorDisplayName = ($initiatorUser instanceof IUser) ? $initiatorUser->getDisplayName() : $initiator; - $subject = (string)$this->l->t('%s shared »%s« with you', array($initiatorDisplayName, $filename)); + $subject = $l->t('%s shared »%s« with you', array($initiatorDisplayName, $filename)); $message = $this->mailer->createMessage(); @@ -705,15 +715,15 @@ class Manager implements IManager { ]); $emailTemplate->addHeader(); - $emailTemplate->addHeading($this->l->t('%s shared »%s« with you', [$initiatorDisplayName, $filename]), false); - $text = $this->l->t('%s shared »%s« with you.', [$initiatorDisplayName, $filename]); + $emailTemplate->addHeading($l->t('%s shared »%s« with you', [$initiatorDisplayName, $filename]), false); + $text = $l->t('%s shared »%s« with you.', [$initiatorDisplayName, $filename]); $emailTemplate->addBodyText( - $text . ' ' . $this->l->t('Click the button below to open it.'), + $text . ' ' . $l->t('Click the button below to open it.'), $text ); $emailTemplate->addBodyButton( - $this->l->t('Open »%s«', [$filename]), + $l->t('Open »%s«', [$filename]), $link ); @@ -721,7 +731,7 @@ class Manager implements IManager { // The "From" contains the sharers name $instanceName = $this->defaults->getName(); - $senderName = $this->l->t( + $senderName = $l->t( '%s via %s', [ $initiatorDisplayName, diff --git a/lib/public/Mail/IEMailTemplate.php b/lib/public/Mail/IEMailTemplate.php index 6c71c0c0473..04a3905c2e3 100644 --- a/lib/public/Mail/IEMailTemplate.php +++ b/lib/public/Mail/IEMailTemplate.php @@ -36,7 +36,7 @@ namespace OCP\Mail; * * $emailTemplate->addHeader(); * $emailTemplate->addHeading('Welcome aboard'); - * $emailTemplate->addBodyText('You have now an Nextcloud account, you can add, protect, and share your data.'); + * $emailTemplate->addBodyText('You now have an Nextcloud account, you can add, protect, and share your data.'); * * $emailTemplate->addBodyButtonGroup( * 'Set your password', 'https://example.org/resetPassword/q1234567890qwertz', diff --git a/settings/Mailer/NewUserMailHelper.php b/settings/Mailer/NewUserMailHelper.php index 9fc6a4a3c70..c111ffeb4fa 100644 --- a/settings/Mailer/NewUserMailHelper.php +++ b/settings/Mailer/NewUserMailHelper.php @@ -130,7 +130,7 @@ class NewUserMailHelper { } else { $emailTemplate->addHeading($this->l10n->t('Welcome aboard %s', [$displayName])); } - $emailTemplate->addBodyText($this->l10n->t('You have now an %s account, you can add, protect, and share your data.', [$this->themingDefaults->getName()])); + $emailTemplate->addBodyText($this->l10n->t('You now have an %s account, you can add, protect, and share your data.', [$this->themingDefaults->getName()])); $emailTemplate->addBodyText($this->l10n->t('Your username is: %s', [$userId])); if ($generatePasswordResetToken) { $leftButtonText = $this->l10n->t('Set your password'); diff --git a/settings/templates/settings/frame.php b/settings/templates/settings/frame.php index 80737bc6f91..57522ca7773 100644 --- a/settings/templates/settings/frame.php +++ b/settings/templates/settings/frame.php @@ -30,7 +30,7 @@ script('files', 'jquery.fileupload'); <div id="app-navigation"> <ul> - <li class="settings-caption">Personal</li> + <li class="settings-caption"><?php p($l->t('Personal')); ?></li> <?php foreach($_['forms']['personal'] as $form) { if (isset($form['anchor'])) { @@ -57,7 +57,7 @@ script('files', 'jquery.fileupload'); <?php if(!empty($_['forms']['admin'])) { ?> - <li class="settings-caption">Administration</li> + <li class="settings-caption"><?php p($l->t('Administration')); ?></li> <?php } foreach($_['forms']['admin'] as $form) { diff --git a/tests/Settings/Mailer/NewUserMailHelperTest.php b/tests/Settings/Mailer/NewUserMailHelperTest.php index 033847e49f6..1af1bed808c 100644 --- a/tests/Settings/Mailer/NewUserMailHelperTest.php +++ b/tests/Settings/Mailer/NewUserMailHelperTest.php @@ -237,7 +237,7 @@ class NewUserMailHelperTest extends TestCase { <table style="border-collapse:collapse;border-spacing:0;padding:0;text-align:left;vertical-align:top;width:100%"> <tr style="padding:0;text-align:left;vertical-align:top"> <th style="Margin:0;color:#0a0a0a;font-family:Lucida Grande,Geneva,Verdana,sans-serif;font-size:16px;font-weight:400;line-height:1.3;margin:0;padding:0;text-align:left"> - <p class="text-left" style="Margin:0;Margin-bottom:10px;color:#777;font-family:Lucida Grande,Geneva,Verdana,sans-serif;font-size:16px;font-weight:400;line-height:1.3;margin:0;margin-bottom:10px;padding:0;text-align:left">You have now an TestCloud account, you can add, protect, and share your data.</p> + <p class="text-left" style="Margin:0;Margin-bottom:10px;color:#777;font-family:Lucida Grande,Geneva,Verdana,sans-serif;font-size:16px;font-weight:400;line-height:1.3;margin:0;margin-bottom:10px;padding:0;text-align:left">You now have an TestCloud account, you can add, protect, and share your data.</p> </th> <th class="expander" style="Margin:0;color:#0a0a0a;font-family:Lucida Grande,Geneva,Verdana,sans-serif;font-size:16px;font-weight:400;line-height:1.3;margin:0;padding:0!important;text-align:left;visibility:hidden;width:0"></th> </tr> @@ -350,7 +350,7 @@ EOF; $expectedTextBody = <<<EOF Welcome aboard -You have now an TestCloud account, you can add, protect, and share your data. +You now have an TestCloud account, you can add, protect, and share your data. Your username is: john @@ -470,7 +470,7 @@ EOF; <table style="border-collapse:collapse;border-spacing:0;padding:0;text-align:left;vertical-align:top;width:100%"> <tr style="padding:0;text-align:left;vertical-align:top"> <th style="Margin:0;color:#0a0a0a;font-family:Lucida Grande,Geneva,Verdana,sans-serif;font-size:16px;font-weight:400;line-height:1.3;margin:0;padding:0;text-align:left"> - <p class="text-left" style="Margin:0;Margin-bottom:10px;color:#777;font-family:Lucida Grande,Geneva,Verdana,sans-serif;font-size:16px;font-weight:400;line-height:1.3;margin:0;margin-bottom:10px;padding:0;text-align:left">You have now an TestCloud account, you can add, protect, and share your data.</p> + <p class="text-left" style="Margin:0;Margin-bottom:10px;color:#777;font-family:Lucida Grande,Geneva,Verdana,sans-serif;font-size:16px;font-weight:400;line-height:1.3;margin:0;margin-bottom:10px;padding:0;text-align:left">You now have an TestCloud account, you can add, protect, and share your data.</p> </th> <th class="expander" style="Margin:0;color:#0a0a0a;font-family:Lucida Grande,Geneva,Verdana,sans-serif;font-size:16px;font-weight:400;line-height:1.3;margin:0;padding:0!important;text-align:left;visibility:hidden;width:0"></th> </tr> @@ -583,7 +583,7 @@ EOF; $expectedTextBody = <<<EOF Welcome aboard John Doe -You have now an TestCloud account, you can add, protect, and share your data. +You now have an TestCloud account, you can add, protect, and share your data. Your username is: john diff --git a/tests/data/emails/new-account-email-custom-text-alternative.txt b/tests/data/emails/new-account-email-custom-text-alternative.txt index 9f02563edfe..52da8957ab3 100644 --- a/tests/data/emails/new-account-email-custom-text-alternative.txt +++ b/tests/data/emails/new-account-email-custom-text-alternative.txt @@ -1,6 +1,6 @@ Welcome aboard - text -You have now an Nextcloud account, you can add, protect, and share your data. - text +You now have an Nextcloud account, you can add, protect, and share your data. - text Your username is: abc diff --git a/tests/data/emails/new-account-email-custom.html b/tests/data/emails/new-account-email-custom.html index e35b9f57848..f5f3fbda21b 100644 --- a/tests/data/emails/new-account-email-custom.html +++ b/tests/data/emails/new-account-email-custom.html @@ -76,7 +76,7 @@ <table style="border-collapse:collapse;border-spacing:0;padding:0;text-align:left;vertical-align:top;width:100%"> <tr style="padding:0;text-align:left;vertical-align:top"> <th style="Margin:0;color:#0a0a0a;font-family:Lucida Grande,Geneva,Verdana,sans-serif;font-size:16px;font-weight:400;line-height:1.3;margin:0;padding:0;text-align:left"> - <p class="text-left" style="Margin:0;Margin-bottom:10px;color:#777;font-family:Lucida Grande,Geneva,Verdana,sans-serif;font-size:16px;font-weight:400;line-height:1.3;margin:0;margin-bottom:10px;padding:0;text-align:left">You have now an Nextcloud account, you can add, protect, and share your data.</p> + <p class="text-left" style="Margin:0;Margin-bottom:10px;color:#777;font-family:Lucida Grande,Geneva,Verdana,sans-serif;font-size:16px;font-weight:400;line-height:1.3;margin:0;margin-bottom:10px;padding:0;text-align:left">You now have an Nextcloud account, you can add, protect, and share your data.</p> </th> <th class="expander" style="Margin:0;color:#0a0a0a;font-family:Lucida Grande,Geneva,Verdana,sans-serif;font-size:16px;font-weight:400;line-height:1.3;margin:0;padding:0!important;text-align:left;visibility:hidden;width:0"></th> </tr> diff --git a/tests/data/emails/new-account-email-custom.txt b/tests/data/emails/new-account-email-custom.txt index e849c73d941..41ac8de8f49 100644 --- a/tests/data/emails/new-account-email-custom.txt +++ b/tests/data/emails/new-account-email-custom.txt @@ -1,6 +1,6 @@ Welcome aboard -You have now an Nextcloud account, you can add, protect, and share your data. +You now have an Nextcloud account, you can add, protect, and share your data. Your username is: abc diff --git a/tests/data/emails/new-account-email-single-button.html b/tests/data/emails/new-account-email-single-button.html index d70a8a647d3..f3874144109 100644 --- a/tests/data/emails/new-account-email-single-button.html +++ b/tests/data/emails/new-account-email-single-button.html @@ -76,7 +76,7 @@ <table style="border-collapse:collapse;border-spacing:0;padding:0;text-align:left;vertical-align:top;width:100%"> <tr style="padding:0;text-align:left;vertical-align:top"> <th style="Margin:0;color:#0a0a0a;font-family:Lucida Grande,Geneva,Verdana,sans-serif;font-size:16px;font-weight:400;line-height:1.3;margin:0;padding:0;text-align:left"> - <p class="text-left" style="Margin:0;Margin-bottom:10px;color:#777;font-family:Lucida Grande,Geneva,Verdana,sans-serif;font-size:16px;font-weight:400;line-height:1.3;margin:0;margin-bottom:10px;padding:0;text-align:left">You have now an Nextcloud account, you can add, protect, and share your data.</p> + <p class="text-left" style="Margin:0;Margin-bottom:10px;color:#777;font-family:Lucida Grande,Geneva,Verdana,sans-serif;font-size:16px;font-weight:400;line-height:1.3;margin:0;margin-bottom:10px;padding:0;text-align:left">You now have an Nextcloud account, you can add, protect, and share your data.</p> </th> <th class="expander" style="Margin:0;color:#0a0a0a;font-family:Lucida Grande,Geneva,Verdana,sans-serif;font-size:16px;font-weight:400;line-height:1.3;margin:0;padding:0!important;text-align:left;visibility:hidden;width:0"></th> </tr> diff --git a/tests/data/emails/new-account-email-single-button.txt b/tests/data/emails/new-account-email-single-button.txt index 90ae35b0695..f05f6136d16 100644 --- a/tests/data/emails/new-account-email-single-button.txt +++ b/tests/data/emails/new-account-email-single-button.txt @@ -1,6 +1,6 @@ Welcome aboard -You have now an Nextcloud account, you can add, protect, and share your data. +You now have an Nextcloud account, you can add, protect, and share your data. Your username is: abc diff --git a/tests/data/emails/new-account-email.html b/tests/data/emails/new-account-email.html index 3e8814bbfbb..72daf3ec5c8 100644 --- a/tests/data/emails/new-account-email.html +++ b/tests/data/emails/new-account-email.html @@ -76,7 +76,7 @@ <table style="border-collapse:collapse;border-spacing:0;padding:0;text-align:left;vertical-align:top;width:100%"> <tr style="padding:0;text-align:left;vertical-align:top"> <th style="Margin:0;color:#0a0a0a;font-family:Lucida Grande,Geneva,Verdana,sans-serif;font-size:16px;font-weight:400;line-height:1.3;margin:0;padding:0;text-align:left"> - <p class="text-left" style="Margin:0;Margin-bottom:10px;color:#777;font-family:Lucida Grande,Geneva,Verdana,sans-serif;font-size:16px;font-weight:400;line-height:1.3;margin:0;margin-bottom:10px;padding:0;text-align:left">You have now an Nextcloud account, you can add, protect, and share your data.</p> + <p class="text-left" style="Margin:0;Margin-bottom:10px;color:#777;font-family:Lucida Grande,Geneva,Verdana,sans-serif;font-size:16px;font-weight:400;line-height:1.3;margin:0;margin-bottom:10px;padding:0;text-align:left">You now have an Nextcloud account, you can add, protect, and share your data.</p> </th> <th class="expander" style="Margin:0;color:#0a0a0a;font-family:Lucida Grande,Geneva,Verdana,sans-serif;font-size:16px;font-weight:400;line-height:1.3;margin:0;padding:0!important;text-align:left;visibility:hidden;width:0"></th> </tr> diff --git a/tests/data/emails/new-account-email.txt b/tests/data/emails/new-account-email.txt index 42d41406ba8..66d7dbc906a 100644 --- a/tests/data/emails/new-account-email.txt +++ b/tests/data/emails/new-account-email.txt @@ -1,6 +1,6 @@ Welcome aboard -You have now an Nextcloud account, you can add, protect, and share your data. +You now have an Nextcloud account, you can add, protect, and share your data. Your username is: abc diff --git a/tests/lib/Mail/EMailTemplateTest.php b/tests/lib/Mail/EMailTemplateTest.php index b2d08f7e81b..fce214a82aa 100644 --- a/tests/lib/Mail/EMailTemplateTest.php +++ b/tests/lib/Mail/EMailTemplateTest.php @@ -76,7 +76,7 @@ class EMailTemplateTest extends TestCase { $this->emailTemplate->addHeader(); $this->emailTemplate->addHeading('Welcome aboard'); - $this->emailTemplate->addBodyText('You have now an Nextcloud account, you can add, protect, and share your data.'); + $this->emailTemplate->addBodyText('You now have an Nextcloud account, you can add, protect, and share your data.'); $this->emailTemplate->addBodyText('Your username is: abc'); $this->emailTemplate->addBodyButtonGroup( 'Set your password', 'https://example.org/resetPassword/123', @@ -117,7 +117,7 @@ class EMailTemplateTest extends TestCase { $this->emailTemplate->addHeader(); $this->emailTemplate->addHeading('Welcome aboard'); - $this->emailTemplate->addBodyText('You have now an Nextcloud account, you can add, protect, and share your data.'); + $this->emailTemplate->addBodyText('You now have an Nextcloud account, you can add, protect, and share your data.'); $this->emailTemplate->addBodyText('Your username is: abc'); $this->emailTemplate->addBodyButtonGroup( 'Set your password', 'https://example.org/resetPassword/123', @@ -156,7 +156,7 @@ class EMailTemplateTest extends TestCase { $this->emailTemplate->addHeader(); $this->emailTemplate->addHeading('Welcome aboard'); - $this->emailTemplate->addBodyText('You have now an Nextcloud account, you can add, protect, and share your data.'); + $this->emailTemplate->addBodyText('You now have an Nextcloud account, you can add, protect, and share your data.'); $this->emailTemplate->addBodyText('Your username is: abc'); $this->emailTemplate->addBodyButton( 'Set your password', 'https://example.org/resetPassword/123', @@ -197,7 +197,7 @@ class EMailTemplateTest extends TestCase { $this->emailTemplate->addHeader(); $this->emailTemplate->addHeading('Welcome aboard', 'Welcome aboard - text'); - $this->emailTemplate->addBodyText('You have now an Nextcloud account, you can add, protect, and share your data.', 'You have now an Nextcloud account, you can add, protect, and share your data. - text'); + $this->emailTemplate->addBodyText('You now have an Nextcloud account, you can add, protect, and share your data.', 'You now have an Nextcloud account, you can add, protect, and share your data. - text'); $this->emailTemplate->addBodyText('Your username is: abc'); $this->emailTemplate->addBodyButtonGroup( 'Set your password', 'https://example.org/resetPassword/123', diff --git a/tests/lib/Share20/ManagerTest.php b/tests/lib/Share20/ManagerTest.php index 174aaffd0b6..b9271c2f752 100644 --- a/tests/lib/Share20/ManagerTest.php +++ b/tests/lib/Share20/ManagerTest.php @@ -35,6 +35,7 @@ use OCP\IServerContainer; use OCP\IURLGenerator; use OCP\IUser; use OCP\IUserManager; +use OCP\L10N\IFactory; use OCP\Mail\IMailer; use OCP\Share\Exceptions\ShareNotFound; use OCP\Share\IProviderFactory; @@ -80,6 +81,8 @@ class ManagerTest extends \Test\TestCase { protected $groupManager; /** @var IL10N|\PHPUnit_Framework_MockObject_MockObject */ protected $l; + /** @var IFactory|\PHPUnit_Framework_MockObject_MockObject */ + protected $l10nFactory; /** @var DummyFactory */ protected $factory; /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */ @@ -110,6 +113,7 @@ class ManagerTest extends \Test\TestCase { $this->urlGenerator = $this->createMock(IURLGenerator::class); $this->defaults = $this->createMock(\OC_Defaults::class); + $this->l10nFactory = $this->createMock(IFactory::class); $this->l = $this->createMock(IL10N::class); $this->l->method('t') ->will($this->returnCallback(function($text, $parameters = []) { @@ -126,6 +130,7 @@ class ManagerTest extends \Test\TestCase { $this->mountManager, $this->groupManager, $this->l, + $this->l10nFactory, $this->factory, $this->userManager, $this->rootFolder, @@ -153,6 +158,7 @@ class ManagerTest extends \Test\TestCase { $this->mountManager, $this->groupManager, $this->l, + $this->l10nFactory, $this->factory, $this->userManager, $this->rootFolder, @@ -2124,6 +2130,7 @@ class ManagerTest extends \Test\TestCase { $this->mountManager, $this->groupManager, $this->l, + $this->l10nFactory, $factory, $this->userManager, $this->rootFolder, @@ -2166,6 +2173,7 @@ class ManagerTest extends \Test\TestCase { $this->mountManager, $this->groupManager, $this->l, + $this->l10nFactory, $factory, $this->userManager, $this->rootFolder, @@ -2817,6 +2825,7 @@ class ManagerTest extends \Test\TestCase { $this->mountManager, $this->groupManager, $this->l, + $this->l10nFactory, $factory, $this->userManager, $this->rootFolder, @@ -2848,6 +2857,7 @@ class ManagerTest extends \Test\TestCase { $this->mountManager, $this->groupManager, $this->l, + $this->l10nFactory, $factory, $this->userManager, $this->rootFolder, @@ -2910,6 +2920,7 @@ class ManagerTest extends \Test\TestCase { $this->mountManager, $this->groupManager, $this->l, + $this->l10nFactory, $factory, $this->userManager, $this->rootFolder, |