aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Mail/EMailTemplateTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/Mail/EMailTemplateTest.php')
-rw-r--r--tests/lib/Mail/EMailTemplateTest.php64
1 files changed, 25 insertions, 39 deletions
diff --git a/tests/lib/Mail/EMailTemplateTest.php b/tests/lib/Mail/EMailTemplateTest.php
index 74f44051988..1912bf060e2 100644
--- a/tests/lib/Mail/EMailTemplateTest.php
+++ b/tests/lib/Mail/EMailTemplateTest.php
@@ -1,24 +1,8 @@
<?php
+
/**
- * @copyright 2017, Morris Jobke <hey@morrisjobke.de>
- *
- * @author Morris Jobke <hey@morrisjobke.de>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace Test\Mail;
@@ -55,15 +39,17 @@ class EMailTemplateTest extends TestCase {
$this->defaults,
$this->urlGenerator,
$this->l10n,
+ 252,
+ 120,
'test.TestTemplate',
[]
);
}
- public function testEMailTemplateCustomFooter() {
+ public function testEMailTemplateCustomFooter(): void {
$this->defaults
- ->expects($this->any())
- ->method('getColorPrimary')
+ ->expects($this->atLeastOnce())
+ ->method('getDefaultColorPrimary')
->willReturn('#0082c9');
$this->defaults
->expects($this->any())
@@ -74,8 +60,8 @@ class EMailTemplateTest extends TestCase {
->method('getName')
->willReturn('TestCloud');
$this->defaults
- ->expects($this->any())
- ->method('getTextColorPrimary')
+ ->expects($this->atLeastOnce())
+ ->method('getDefaultTextColorPrimary')
->willReturn('#ffffff');
$this->urlGenerator
->expects($this->once())
@@ -101,10 +87,10 @@ class EMailTemplateTest extends TestCase {
$this->assertSame($expectedTXT, $this->emailTemplate->renderText());
}
- public function testEMailTemplateDefaultFooter() {
+ public function testEMailTemplateDefaultFooter(): void {
$this->defaults
- ->expects($this->any())
- ->method('getColorPrimary')
+ ->expects($this->atLeastOnce())
+ ->method('getDefaultColorPrimary')
->willReturn('#0082c9');
$this->defaults
->expects($this->any())
@@ -119,8 +105,8 @@ class EMailTemplateTest extends TestCase {
->method('getLogo')
->willReturn('/img/logo-mail-header.png');
$this->defaults
- ->expects($this->any())
- ->method('getTextColorPrimary')
+ ->expects($this->atLeastOnce())
+ ->method('getDefaultTextColorPrimary')
->willReturn('#ffffff');
$this->urlGenerator
->expects($this->once())
@@ -144,10 +130,10 @@ class EMailTemplateTest extends TestCase {
$this->assertSame($expectedTXT, $this->emailTemplate->renderText());
}
- public function testEMailTemplateSingleButton() {
+ public function testEMailTemplateSingleButton(): void {
$this->defaults
- ->expects($this->any())
- ->method('getColorPrimary')
+ ->expects($this->atLeastOnce())
+ ->method('getDefaultColorPrimary')
->willReturn('#0082c9');
$this->defaults
->expects($this->any())
@@ -162,8 +148,8 @@ class EMailTemplateTest extends TestCase {
->method('getLogo')
->willReturn('/img/logo-mail-header.png');
$this->defaults
- ->expects($this->any())
- ->method('getTextColorPrimary')
+ ->expects($this->atLeastOnce())
+ ->method('getDefaultTextColorPrimary')
->willReturn('#ffffff');
$this->urlGenerator
->expects($this->once())
@@ -189,10 +175,10 @@ class EMailTemplateTest extends TestCase {
- public function testEMailTemplateAlternativePlainTexts() {
+ public function testEMailTemplateAlternativePlainTexts(): void {
$this->defaults
- ->expects($this->any())
- ->method('getColorPrimary')
+ ->expects($this->atLeastOnce())
+ ->method('getDefaultColorPrimary')
->willReturn('#0082c9');
$this->defaults
->expects($this->any())
@@ -207,8 +193,8 @@ class EMailTemplateTest extends TestCase {
->method('getLogo')
->willReturn('/img/logo-mail-header.png');
$this->defaults
- ->expects($this->any())
- ->method('getTextColorPrimary')
+ ->expects($this->atLeastOnce())
+ ->method('getDefaultTextColorPrimary')
->willReturn('#ffffff');
$this->urlGenerator
->expects($this->once())