aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/Wallabag/CoreBundle/Entity/EntryTest.php
diff options
context:
space:
mode:
authorlizyn <zhiylin@outlook.com>2020-02-24 10:04:13 +0800
committerGitHub <noreply@github.com>2020-02-24 10:04:13 +0800
commitb19df31d78d881a43bcf6b3215e5fc3781e8e8aa (patch)
treed0d9861694a4b5e5fbfdbeb53c255ecd15fe9328 /tests/Wallabag/CoreBundle/Entity/EntryTest.php
parent4d0c632c70ea50d459c3c55ddda2e0f394dd51cb (diff)
parent04d918cae0227c06a41d27fb6533dddbf30dfe71 (diff)
downloadwallabag-b19df31d78d881a43bcf6b3215e5fc3781e8e8aa.tar.gz
wallabag-b19df31d78d881a43bcf6b3215e5fc3781e8e8aa.tar.zst
wallabag-b19df31d78d881a43bcf6b3215e5fc3781e8e8aa.zip
Merge pull request #1 from wallabag/master
Keep up with the master again
Diffstat (limited to 'tests/Wallabag/CoreBundle/Entity/EntryTest.php')
-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}