aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Contacts/ContactsMenu/Providers/LocalTimeProviderTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/Contacts/ContactsMenu/Providers/LocalTimeProviderTest.php')
-rw-r--r--tests/lib/Contacts/ContactsMenu/Providers/LocalTimeProviderTest.php12
1 files changed, 5 insertions, 7 deletions
diff --git a/tests/lib/Contacts/ContactsMenu/Providers/LocalTimeProviderTest.php b/tests/lib/Contacts/ContactsMenu/Providers/LocalTimeProviderTest.php
index 7b1e6249832..cc53c0bcfcf 100644
--- a/tests/lib/Contacts/ContactsMenu/Providers/LocalTimeProviderTest.php
+++ b/tests/lib/Contacts/ContactsMenu/Providers/LocalTimeProviderTest.php
@@ -47,15 +47,15 @@ class LocalTimeProviderTest extends TestCase {
$this->l = $this->createMock(IL10N::class);
$this->l->expects($this->any())
->method('t')
- ->will($this->returnCallback(function ($text, $parameters = []) {
+ ->willReturnCallback(function ($text, $parameters = []) {
return vsprintf($text, $parameters);
- }));
+ });
$this->l->expects($this->any())
->method('n')
- ->will($this->returnCallback(function ($text, $textPlural, $n, $parameters = []) {
+ ->willReturnCallback(function ($text, $textPlural, $n, $parameters = []) {
$formatted = str_replace('%n', (string)$n, $n === 1 ? $text : $textPlural);
return vsprintf($formatted, $parameters);
- }));
+ });
$this->urlGenerator = $this->createMock(IURLGenerator::class);
$this->userManager = $this->createMock(IUserManager::class);
$this->timeFactory = $this->createMock(ITimeFactory::class);
@@ -110,9 +110,7 @@ class LocalTimeProviderTest extends TestCase {
];
}
- /**
- * @dataProvider dataTestProcess
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('dataTestProcess')]
public function testProcess(bool $hasCurrentUser, ?string $currentUserTZ, ?string $targetUserTZ, string $expected): void {
$entry = $this->createMock(IEntry::class);
$entry->expects($this->once())