Skip to content

Commit 46b6994

Browse files
committed
minor symfony#49948 Fix intl data tests (stof)
This PR was squashed before being merged into the 5.4 branch. Discussion ---------- Fix intl data tests | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | n/a | License | MIT | Doc PR | n/a The migration to static data providers in tests missed a broken method call because the CI did not run the intl-data tests when modifying those tests outside of a PR updating the data (I caught this when my PR moving the emoji data to a different location triggered this workflow). Commits ------- 7ddec68 Fix intl data tests
2 parents ce84991 + 7ddec68 commit 46b6994

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

.github/workflows/intl-data-tests.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,18 @@ name: Intl data
33
on:
44
push:
55
paths:
6+
- 'src/Symfony/Component/Intl/*.php'
7+
- 'src/Symfony/Component/Intl/Util/GitRepository.php'
68
- 'src/Symfony/Component/Intl/Resources/data/**'
9+
- 'src/Symfony/Component/Intl/Tests/*Test.php'
10+
- 'src/Symfony/Component/Intl/Tests/Util/GitRepositoryTest.php'
711
pull_request:
812
paths:
13+
- 'src/Symfony/Component/Intl/*.php'
14+
- 'src/Symfony/Component/Intl/Util/GitRepository.php'
915
- 'src/Symfony/Component/Intl/Resources/data/**'
16+
- 'src/Symfony/Component/Intl/Tests/*Test.php'
17+
- 'src/Symfony/Component/Intl/Tests/Util/GitRepositoryTest.php'
1018

1119
defaults:
1220
run:

src/Symfony/Component/Intl/Tests/CurrenciesTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,7 @@ public function testGetNumericCodeFailsIfNoNumericEquivalent($currency)
736736

737737
public static function provideValidNumericCodes()
738738
{
739-
$numericToAlpha3 = $this->getNumericToAlpha3Mapping();
739+
$numericToAlpha3 = self::getNumericToAlpha3Mapping();
740740

741741
return array_map(
742742
function ($numeric, $alpha3) { return [$numeric, $alpha3]; },
@@ -761,7 +761,7 @@ public function testForNumericCode($numeric, $expected)
761761

762762
public static function provideInvalidNumericCodes()
763763
{
764-
$validNumericCodes = array_keys($this->getNumericToAlpha3Mapping());
764+
$validNumericCodes = array_keys(self::getNumericToAlpha3Mapping());
765765
$invalidNumericCodes = array_diff(range(0, 1000), $validNumericCodes);
766766

767767
return array_map(
@@ -791,7 +791,7 @@ public function testExists()
791791
$this->assertFalse(Currencies::exists('XXX'));
792792
}
793793

794-
private function getNumericToAlpha3Mapping()
794+
private static function getNumericToAlpha3Mapping()
795795
{
796796
$numericToAlpha3 = [];
797797

0 commit comments

Comments
 (0)