Browse Source

Fix tests

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
tags/v14.0.0beta1
Roeland Jago Douma 6 years ago
parent
commit
0c500e460f
No account linked to committer's email address

+ 1
- 1
lib/private/Mail/EMailTemplate.php View File

@@ -555,7 +555,7 @@ EOF;
*
* @since 12.0.0
*/
public function addBodyButton(string $text, string $url, string $plainText = '') {
public function addBodyButton(string $text, string $url, $plainText = '') {
if ($this->footerAdded) {
return;
}

+ 1
- 1
lib/public/Mail/IEMailTemplate.php View File

@@ -132,7 +132,7 @@ interface IEMailTemplate {
*
* @since 12.0.0
*/
public function addBodyButton(string $text, string $url, string $plainText = '');
public function addBodyButton(string $text, string $url, $plainText = '');

/**
* Adds a logo and a text to the footer. <br> in the text will be replaced by new lines in the plain text email

+ 4
- 0
tests/lib/Mail/MailerTest.php View File

@@ -133,6 +133,10 @@ class MailerTest extends TestCase {
}

public function testCreateEMailTemplate() {
$this->config->method('getSystemValue')
->with('mail_template_class', '')
->willReturnArgument(1);

$this->assertSame(EMailTemplate::class, get_class($this->mailer->createEMailTemplate('tests.MailerTest')));
}
}

+ 3
- 3
tests/lib/Mail/MessageTest.php View File

@@ -30,7 +30,7 @@ class MessageTest extends TestCase {
);
}

function setUp() {
public function setUp() {
parent::setUp();

$this->swiftMessage = $this->getMockBuilder('\Swift_Message')
@@ -79,9 +79,9 @@ class MessageTest extends TestCase {
$this->swiftMessage
->expects($this->once())
->method('getReplyTo')
->will($this->returnValue(['lukas@owncloud.com']));
->willReturn('lukas@owncloud.com');

$this->assertSame(['lukas@owncloud.com'], $this->message->getReplyTo());
$this->assertSame('lukas@owncloud.com', $this->message->getReplyTo());
}

public function testSetTo() {

Loading…
Cancel
Save