mirror of
https://github.com/wallabag/wallabag.git
synced 2025-08-01 17:38:38 +00:00
Ensure language is valid
- Do not override locale if user has choosen a locale from the login screen. - Add some tests about locale url
This commit is contained in:
parent
be417ef236
commit
4d4147b228
6 changed files with 76 additions and 9 deletions
|
@ -8,6 +8,8 @@ use PHPUnit\Framework\TestCase;
|
|||
use Symfony\Component\EventDispatcher\EventDispatcher;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpFoundation\Session\Session;
|
||||
use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage;
|
||||
use Wallabag\CoreBundle\Entity\Config;
|
||||
use Wallabag\UserBundle\Entity\User;
|
||||
use Wallabag\UserBundle\EventListener\CreateConfigListener;
|
||||
|
@ -22,6 +24,7 @@ class CreateConfigListenerTest extends TestCase
|
|||
|
||||
protected function setUp()
|
||||
{
|
||||
$session = new Session(new MockArraySessionStorage());
|
||||
$this->em = $this->getMockBuilder('Doctrine\ORM\EntityManager')
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
@ -34,7 +37,8 @@ class CreateConfigListenerTest extends TestCase
|
|||
'fr',
|
||||
1,
|
||||
1,
|
||||
1
|
||||
1,
|
||||
$session
|
||||
);
|
||||
|
||||
$this->dispatcher = new EventDispatcher();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue