Upgrade tests to PhpUnit 10 (#5252)
This commit is contained in:
@@ -106,10 +106,10 @@ class LocaleServiceTest extends TestCase
|
||||
public function testGetAllLocales(): void
|
||||
{
|
||||
$sut = $this->getSut([]);
|
||||
$this->assertEquals([], $sut->getAllLocales());
|
||||
self::assertEquals([], $sut->getAllLocales());
|
||||
|
||||
$sut = $this->getSut($this->getDefaultSettings());
|
||||
$this->assertEquals(['de', 'en', 'en_AU', 'pt_BR', 'it', 'fr', 'fr_BE', 'fr_CA', 'es', 'ru', 'ar', 'hu'], $sut->getAllLocales());
|
||||
self::assertEquals(['de', 'en', 'en_AU', 'pt_BR', 'it', 'fr', 'fr_BE', 'fr_CA', 'es', 'ru', 'ar', 'hu'], $sut->getAllLocales());
|
||||
}
|
||||
|
||||
public function testInvalidLocaleWithGivenLocale(): void
|
||||
@@ -124,26 +124,26 @@ class LocaleServiceTest extends TestCase
|
||||
public function testGetDurationFormat(): void
|
||||
{
|
||||
$sut = $this->getSut($this->getDefaultSettings());
|
||||
$this->assertEquals('%h:%m', $sut->getDurationFormat('de'));
|
||||
self::assertEquals('%h:%m', $sut->getDurationFormat('de'));
|
||||
}
|
||||
|
||||
public function testGetDateFormat(): void
|
||||
{
|
||||
$sut = $this->getSut($this->getDefaultSettings());
|
||||
$this->assertEquals('d.m.Y', $sut->getDateFormat('de'));
|
||||
self::assertEquals('d.m.Y', $sut->getDateFormat('de'));
|
||||
}
|
||||
|
||||
public function testGetDateTimeFormat(): void
|
||||
{
|
||||
$sut = $this->getSut($this->getDefaultSettings());
|
||||
$this->assertEquals('d.m.Y H:i', $sut->getDateTimeFormat('de'));
|
||||
self::assertEquals('d.m.Y H:i', $sut->getDateTimeFormat('de'));
|
||||
}
|
||||
|
||||
public function testGetTimeFormat(): void
|
||||
{
|
||||
$sut = $this->getSut($this->getDefaultSettings());
|
||||
$this->assertEquals('H:i', $sut->getTimeFormat('de'));
|
||||
$this->assertEquals('H:i:s', $sut->getTimeFormat('en'));
|
||||
self::assertEquals('H:i', $sut->getTimeFormat('de'));
|
||||
self::assertEquals('H:i:s', $sut->getTimeFormat('en'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -153,13 +153,13 @@ class LocaleServiceTest extends TestCase
|
||||
{
|
||||
$sut = $this->getSut($this->getDefaultSettings());
|
||||
$actual = $sut->getNearestTranslationLocale($locale);
|
||||
$this->assertEquals($expected, $actual);
|
||||
self::assertEquals($expected, $actual);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<int, array<int, string>>
|
||||
*/
|
||||
public function getNearestTranslationLocaleData(): array
|
||||
public static function getNearestTranslationLocaleData(): array
|
||||
{
|
||||
return [
|
||||
['de', 'de'], // registered and translated: use it
|
||||
|
||||
Reference in New Issue
Block a user