Fix tests

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2018-03-02 07:50:35 +01:00
parent 0cef938299
commit 0c500e460f
No known key found for this signature in database
GPG Key ID: F941078878347C0C
4 changed files with 9 additions and 5 deletions

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;
}

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

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')));
}
}

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() {