1
0
Fork 0
mirror of https://github.com/archtechx/gloss.git synced 2025-12-12 03:04:04 +00:00

Add localized choice test

This commit is contained in:
Samuel Štancl 2020-12-13 03:48:55 +01:00
parent 81c8547077
commit f2072fc94e

View file

@ -211,7 +211,12 @@ class GlossTest extends TestCase
]));
$this->assertSame('There are no apples', gloss()->choice('test.apples', 0));
$this->assertSame('There are <span class="font-medium">2</span> apples', gloss()->choice('test.apples', 2));
$this->assertSame('There are <span class="font-medium">5</span> apples', gloss()->choice('test.apples', 5));
gloss()->setLocale('cs');
$this->assertSame('Není tam žádné jablko', gloss()->choice('test.apples', 0));
$this->assertSame('Je tam <span class="font-medium">5</span> jablek', gloss()->choice('test.apples', 5));
}
protected function addMessage(string $key, string $value, string $locale = 'en', string $group = 'test', string $namespace = null): void