diff options
author | Mario <mario@mariovavti.com> | 2018-01-09 09:00:20 +0100 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2018-01-09 09:00:20 +0100 |
commit | 4f4d0e416eac87121898b8a27b1afa6065ff17a2 (patch) | |
tree | aae7f2582b2b9c6596dcbf87c06a836434140830 /library/intl/tests/LocaleResolverTest.php | |
parent | 22c89b6c660e185d5c5c6362acf23b145d932d15 (diff) | |
parent | 8fde0f01b8472082158b38386046ed606bcfbc49 (diff) | |
download | volse-hubzilla-4f4d0e416eac87121898b8a27b1afa6065ff17a2.tar.gz volse-hubzilla-4f4d0e416eac87121898b8a27b1afa6065ff17a2.tar.bz2 volse-hubzilla-4f4d0e416eac87121898b8a27b1afa6065ff17a2.zip |
Merge branch '3.0RC'3.0
Diffstat (limited to 'library/intl/tests/LocaleResolverTest.php')
-rw-r--r-- | library/intl/tests/LocaleResolverTest.php | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/library/intl/tests/LocaleResolverTest.php b/library/intl/tests/LocaleResolverTest.php deleted file mode 100644 index a52dea353..000000000 --- a/library/intl/tests/LocaleResolverTest.php +++ /dev/null @@ -1,51 +0,0 @@ -<?php - -namespace CommerceGuys\Intl\Tests; - -use org\bovigo\vfs\vfsStream; - -/** - * @coversDefaultClass \CommerceGuys\Intl\LocaleResolverTrait - */ -class LocaleResolverTest extends \PHPUnit_Framework_TestCase -{ - /** - * @var DummyRepository - */ - protected $repository; - - public function setUp() - { - // Simulate the presence of various definitions. - $root = vfsStream::setup('resources'); - vfsStream::newFile('dummy/bs-Cyrl.json')->at($root)->setContent(''); - vfsStream::newFile('dummy/bs.json')->at($root)->setContent(''); - vfsStream::newFile('dummy/en.json')->at($root)->setContent(''); - - $this->repository = new DummyRepository(); - } - - /** - * @covers ::resolveLocale - * @covers ::getLocaleVariants - */ - public function testLocaleFallback() - { - $locale = $this->repository->runResolveLocale('bs-Cyrl-BA'); - $this->assertEquals('bs-Cyrl', $locale); - $locale = $this->repository->runResolveLocale('bs-Latn-BA'); - $this->assertEquals('bs', $locale); - $locale = $this->repository->runResolveLocale('de', 'en'); - $this->assertEquals('en', $locale); - } - - /** - * @covers ::resolveLocale - * @covers ::getLocaleVariants - * @expectedException \CommerceGuys\Intl\Exception\UnknownLocaleException - */ - public function testInvalidLocale() - { - $locale = $this->repository->runResolveLocale('de'); - } -} |