Skip to content

Fix intl data tests #49948

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/intl-data-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,18 @@ name: Intl data
on:
push:
paths:
- 'src/Symfony/Component/Intl/*.php'
- 'src/Symfony/Component/Intl/Util/GitRepository.php'
- 'src/Symfony/Component/Intl/Resources/data/**'
- 'src/Symfony/Component/Intl/Tests/*Test.php'
- 'src/Symfony/Component/Intl/Tests/Util/GitRepositoryTest.php'
pull_request:
paths:
- 'src/Symfony/Component/Intl/*.php'
- 'src/Symfony/Component/Intl/Util/GitRepository.php'
- 'src/Symfony/Component/Intl/Resources/data/**'
- 'src/Symfony/Component/Intl/Tests/*Test.php'
- 'src/Symfony/Component/Intl/Tests/Util/GitRepositoryTest.php'

defaults:
run:
Expand Down
6 changes: 3 additions & 3 deletions src/Symfony/Component/Intl/Tests/CurrenciesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ public function testGetNumericCodeFailsIfNoNumericEquivalent($currency)

public static function provideValidNumericCodes()
{
$numericToAlpha3 = $this->getNumericToAlpha3Mapping();
$numericToAlpha3 = self::getNumericToAlpha3Mapping();

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

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

return array_map(
Expand Down Expand Up @@ -791,7 +791,7 @@ public function testExists()
$this->assertFalse(Currencies::exists('XXX'));
}

private function getNumericToAlpha3Mapping()
private static function getNumericToAlpha3Mapping()
{
$numericToAlpha3 = [];

Expand Down