diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2019-11-27 17:27:18 +0300 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2019-11-27 17:27:18 +0300 |
commit | 3a7cf40aaa678bea1df143d2982d603b7a334eec (patch) | |
tree | 63c1e3ad7f7f401d14411a4d44c523632906afc9 /tests/lib/Mail | |
parent | 0568b012672d650c6b5a49e72c4028dde5463c60 (diff) |
Mode to modern phpunit
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'tests/lib/Mail')
-rw-r--r-- | tests/lib/Mail/EMailTemplateTest.php | 2 | ||||
-rw-r--r-- | tests/lib/Mail/MailerTest.php | 8 | ||||
-rw-r--r-- | tests/lib/Mail/MessageTest.php | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/tests/lib/Mail/EMailTemplateTest.php b/tests/lib/Mail/EMailTemplateTest.php index 60d7d2bbbf8..d48826ff5c5 100644 --- a/tests/lib/Mail/EMailTemplateTest.php +++ b/tests/lib/Mail/EMailTemplateTest.php @@ -39,7 +39,7 @@ class EMailTemplateTest extends TestCase { /** @var EMailTemplate */ private $emailTemplate; - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->defaults = $this->createMock(Defaults::class); diff --git a/tests/lib/Mail/MailerTest.php b/tests/lib/Mail/MailerTest.php index 911e5708296..3a08cd9acf2 100644 --- a/tests/lib/Mail/MailerTest.php +++ b/tests/lib/Mail/MailerTest.php @@ -31,7 +31,7 @@ class MailerTest extends TestCase { /** @var Mailer */ private $mailer; - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->config = $this->createMock(IConfig::class); @@ -126,10 +126,10 @@ class MailerTest extends TestCase { $this->assertInstanceOf('\OC\Mail\Message', $this->mailer->createMessage()); } - /** - * @expectedException \Exception - */ + public function testSendInvalidMailException() { + $this->expectException(\Exception::class); + $message = $this->getMockBuilder('\OC\Mail\Message') ->disableOriginalConstructor()->getMock(); $message->expects($this->once()) diff --git a/tests/lib/Mail/MessageTest.php b/tests/lib/Mail/MessageTest.php index 729178d328d..e0a0f468a50 100644 --- a/tests/lib/Mail/MessageTest.php +++ b/tests/lib/Mail/MessageTest.php @@ -31,7 +31,7 @@ class MessageTest extends TestCase { ); } - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->swiftMessage = $this->getMockBuilder('\Swift_Message') |