forked from wallabag/wallabag
Move to Symfony Flex
The structure changed completely. Bundles are gone. Everything is flatten in the folder `src`. I separated import & api controllers to avoid _pollution_ in the main controller folder.
This commit is contained in:
28
tests/Entity/EntryTest.php
Normal file
28
tests/Entity/EntryTest.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Tests\Entity;
|
||||
|
||||
use App\Entity\Entry;
|
||||
use App\Tests\WallabagCoreTestCase;
|
||||
|
||||
class EntryTest extends WallabagCoreTestCase
|
||||
{
|
||||
public function testGetLanguage()
|
||||
{
|
||||
$this->logInAs('admin');
|
||||
$entry = new Entry($this->getLoggedInUser());
|
||||
$languages = [
|
||||
'en_GB' => 'en-GB',
|
||||
'en_US' => 'en-US',
|
||||
'en-gb' => 'en-GB',
|
||||
'en-US' => 'en-US',
|
||||
'fr' => 'fr',
|
||||
'fr_FR' => 'fr-FR',
|
||||
'ja' => 'ja',
|
||||
];
|
||||
foreach ($languages as $entryLang => $lang) {
|
||||
$entry->setLanguage($entryLang);
|
||||
$this->assertSame($lang, $entry->getHTMLLanguage());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user