aboutsummaryrefslogtreecommitdiffstats
path: root/library/intl/tests/LocaleResolverTest.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-12-30 15:47:01 -0800
committerfriendica <info@friendica.com>2014-12-30 15:47:01 -0800
commitc0885c81e67789a91e3784aeb49e9d5f0832a7fe (patch)
treeac67757a0488b1293b325b0f60c31df4eaecac32 /library/intl/tests/LocaleResolverTest.php
parentabd345f80f5074d325fd137e48a23925eaa66802 (diff)
parenta54f168463abd0657d28bd0223b1b6907fd7bdb3 (diff)
downloadvolse-hubzilla-c0885c81e67789a91e3784aeb49e9d5f0832a7fe.tar.gz
volse-hubzilla-c0885c81e67789a91e3784aeb49e9d5f0832a7fe.tar.bz2
volse-hubzilla-c0885c81e67789a91e3784aeb49e9d5f0832a7fe.zip
Merge branch 'master' into trinidad
Diffstat (limited to 'library/intl/tests/LocaleResolverTest.php')
-rw-r--r--library/intl/tests/LocaleResolverTest.php51
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');
- }
-}