]> git.immae.eu Git - github/wallabag/wallabag.git/blob - tests/Wallabag/CoreBundle/Entity/EntryTest.php
Merge pull request #1 from wallabag/master
[github/wallabag/wallabag.git] / tests / Wallabag / CoreBundle / Entity / EntryTest.php
1 <?php
2
3 namespace Tests\Wallabag\CoreBundle\Entity;
4
5 use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
6 use Wallabag\CoreBundle\Entity\Entry;
7
8 class 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 }