Skip to content

Commit ddd3977

Browse files
committed
Merge branch '7.1' into 7.2
* 7.1: Fix named arguments in data providers Make more data providers static fix merge Mutate remaining data providers to static ones
2 parents 441c390 + a0ba7a4 commit ddd3977

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

Tests/LocalesTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ class LocalesTest extends ResourceBundleTestCase
2121
{
2222
public function testGetLocales()
2323
{
24-
$this->assertSame($this->getLocales(), Locales::getLocales());
24+
$this->assertSame(static::getLocales(), Locales::getLocales());
2525
}
2626

2727
public function testGetAliases()
2828
{
29-
$this->assertSame($this->getLocaleAliases(), Locales::getAliases());
29+
$this->assertSame(static::getLocaleAliases(), Locales::getAliases());
3030
}
3131

3232
/**
@@ -41,7 +41,7 @@ public function testGetNames($displayLocale)
4141
// We can't assert on exact list of locale, as there's too many variations.
4242
// The best we can do is to make sure getNames() returns a subset of what getLocales() returns.
4343
$this->assertNotEmpty($locales);
44-
$this->assertEmpty(array_diff($locales, $this->getLocales()));
44+
$this->assertEmpty(array_diff($locales, static::getLocales()));
4545
}
4646

4747
public function testGetNamesDefaultLocale()

Tests/ResourceBundleTestCase.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -762,24 +762,24 @@ public static function provideLocales()
762762
{
763763
return array_map(
764764
fn ($locale) => [$locale],
765-
self::getLocales()
765+
static::getLocales()
766766
);
767767
}
768768

769769
public static function provideLocaleAliases()
770770
{
771771
return array_map(
772772
fn ($alias, $ofLocale) => [$alias, $ofLocale],
773-
array_keys(self::getLocaleAliases()),
774-
self::getLocaleAliases()
773+
array_keys(static::getLocaleAliases()),
774+
static::getLocaleAliases()
775775
);
776776
}
777777

778778
public static function provideRootLocales()
779779
{
780780
return array_map(
781781
fn ($locale) => [$locale],
782-
self::getRootLocales()
782+
static::getRootLocales()
783783
);
784784
}
785785

@@ -796,8 +796,8 @@ protected static function getLocaleAliases()
796796
protected static function getRootLocales()
797797
{
798798
if (null === self::$rootLocales) {
799-
// ignore locales for which fallback is possible (e.g "en_GB")
800-
self::$rootLocales = array_filter(self::getLocales(), fn ($locale) => !str_contains($locale, '_'));
799+
// no locales for which fallback is possible (e.g "en_GB")
800+
self::$rootLocales = array_filter(static::getLocales(), fn ($locale) => !str_contains($locale, '_'));
801801
}
802802

803803
return self::$rootLocales;

0 commit comments

Comments
 (0)