aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorSimounet <contact@simounet.net>2019-01-11 21:09:49 +0100
committerSimounet <contact@simounet.net>2020-01-23 21:21:54 +0100
commit416d44d0aef68b04aec90d207e33feb68706e1c3 (patch)
treef304459c29a6c69a9f445377d6c11d9a379923bc /tests
parent7937ed0c20ca0df493c775e93a3294aeb5f7da26 (diff)
downloadwallabag-416d44d0aef68b04aec90d207e33feb68706e1c3.tar.gz
wallabag-416d44d0aef68b04aec90d207e33feb68706e1c3.tar.zst
wallabag-416d44d0aef68b04aec90d207e33feb68706e1c3.zip
Use lang attribute
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}