Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
bohanyang committed Sep 12, 2023
1 parent df4687e commit 9162baf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<?php

declare(strict_types=1);

namespace Mango\Tests;

use Mango\Utils\LocaleMatcher;
use PHPUnit\Framework\TestCase;
use Mango\Utils\Bcp47;

class Bcp47Test extends TestCase
class LocaleMatcherTest extends TestCase
{
/**
* @dataProvider localeMatchingProvider
*/
/** @dataProvider localeMatchingProvider */
public function testGetBestMatch($availableLocales, $tests): void
{
$bcp47 = new Bcp47();
$localeMatcher = new LocaleMatcher();
foreach ($tests as [$clientLocale, $expected]) {
$this->assertSame($expected, $bcp47->getBestMatch($clientLocale, $availableLocales));
$this->assertSame($expected, $localeMatcher->getBestMatch($clientLocale, $availableLocales));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use function preg_match;
use function strtoupper;

class Bcp47
class LocaleMatcher
{
private array $firstMatchesCache = [];

Expand Down

0 comments on commit 9162baf

Please sign in to comment.