Fix notifier test

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
pull/23780/head
Roeland Jago Douma 2020-11-30 12:24:23 +07:00
parent 48679ae39f
commit 7f0b2738bf
No known key found for this signature in database
GPG Key ID: F941078878347C0C
1 changed files with 5 additions and 2 deletions

@ -63,6 +63,9 @@ class NotifierTest extends TestCase {
$this->l10n->expects($this->any())
->method('t')
->willReturnCallback(function ($string, $args) {
if (!is_array($args)) {
$args = [$args];
}
return vsprintf($string, $args);
});
$this->l10n->expects($this->any())
@ -103,7 +106,7 @@ class NotifierTest extends TestCase {
$this->assertEquals($this->notifier->getName(), 'Calendar');
}
public function testPrepareWrongApp(): void {
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage('Notification not from this app');
@ -120,7 +123,7 @@ class NotifierTest extends TestCase {
$this->notifier->prepare($notification, 'en');
}
public function testPrepareWrongSubject() {
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage('Unknown subject');