Add test case for getDefaultStatusById

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
This commit is contained in:
Daniel Kesselberg 2020-09-24 22:32:27 +02:00
parent 4123164155
commit a61394d528
No known key found for this signature in database
GPG Key ID: 36E3664E099D0614
1 changed files with 24 additions and 0 deletions

View File

@ -181,4 +181,28 @@ class PredefinedStatusServiceTest extends TestCase {
['unknown-id', false],
];
}
public function testGetDefaultStatusById(): void {
$this->l10n->expects($this->exactly(5))
->method('t')
->withConsecutive(
['In a meeting'],
['Commuting'],
['Working remotely'],
['Out sick'],
['Vacationing']
)
->willReturnArgument(0);
$this->assertEquals([
'id' => 'vacationing',
'icon' => '🌴',
'message' => 'Vacationing',
'clearAt' => null,
], $this->service->getDefaultStatusById('vacationing'));
}
public function testGetDefaultStatusByUnknownId(): void {
$this->assertNull($this->service->getDefaultStatusById('unknown'));
}
}