mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 01:25:55 +02:00
Allow locales like de_DE in removeLocaleFromPath function
Related to issue #563
This commit is contained in:
parent
eb02404d49
commit
445229976f
2 changed files with 5 additions and 3 deletions
|
@ -36,16 +36,18 @@ class UserExtensionTest extends WebTestCase
|
|||
$this->service = self::getContainer()->get(UserExtension::class);
|
||||
}
|
||||
|
||||
public function removeeLocaleFromPathDataSet(): ?\Generator
|
||||
public function removeLocaleFromPathDataSet(): ?\Generator
|
||||
{
|
||||
yield ['/', '/de/'];
|
||||
yield ['/test', '/de/test'];
|
||||
yield ['/test/foo', '/en/test/foo'];
|
||||
yield ['/test/foo/bar?param1=val1¶m2=val2', '/en/test/foo/bar?param1=val1¶m2=val2'];
|
||||
//Allow de_DE
|
||||
yield ['/test/foo/bar?param1=val1¶m2=val2', '/de_DE/test/foo/bar?param1=val1¶m2=val2'];
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider removeeLocaleFromPathDataSet
|
||||
* @dataProvider removeLocaleFromPathDataSet
|
||||
*/
|
||||
public function testRemoveLocaleFromPath(string $expected, string $input): void
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue