forked from wallabag/wallabag
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:
@ -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();
|
||||
|
||||
Reference in New Issue
Block a user