aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/Wallabag/CoreBundle/Entity/EntryTest.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/Wallabag/CoreBundle/Entity/EntryTest.php b/tests/Wallabag/CoreBundle/Entity/EntryTest.php
new file mode 100644
index 00000000..d400636e
--- /dev/null
+++ b/tests/Wallabag/CoreBundle/Entity/EntryTest.php
@@ -0,0 +1,28 @@
1<?php
2
3namespace Tests\Wallabag\CoreBundle\Entity;
4
5use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
6use Wallabag\CoreBundle\Entity\Entry;
7
8class EntryTest extends WallabagCoreTestCase
9{
10 public function testGetLanguage()
11 {
12 $this->logInAs('admin');
13 $entry = new Entry($this->getLoggedInUser());
14 $languages = [
15 'en_GB' => 'en-GB',
16 'en_US' => 'en-US',
17 'en-gb' => 'en-GB',
18 'en-US' => 'en-US',
19 'fr' => 'fr',
20 'fr_FR' => 'fr-FR',
21 'ja' => 'ja',
22 ];
23 foreach ($languages as $entryLang => $lang) {
24 $entry->setLanguage($entryLang);
25 $this->assertSame($lang, $entry->getHTMLLanguage());
26 }
27 }
28}