diff options
author | zotlabs <mike@macgirvin.com> | 2017-11-04 18:18:56 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-11-04 18:18:56 -0700 |
commit | 65bc146afa82f3f0f2e3921660189892af42c15b (patch) | |
tree | afbe430a72f01a2ba02b05f4587cf42196c6a136 /library/intl/tests/LocaleResolverTest.php | |
parent | 9630d2ef2c042c5531bf3a553317ae3bd115f3dc (diff) | |
parent | 6995d54a3cc162d87f881f6e206fa356230fd9e8 (diff) | |
download | volse-hubzilla-65bc146afa82f3f0f2e3921660189892af42c15b.tar.gz volse-hubzilla-65bc146afa82f3f0f2e3921660189892af42c15b.tar.bz2 volse-hubzilla-65bc146afa82f3f0f2e3921660189892af42c15b.zip |
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge
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'); - } -} |