]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - tests/Wallabag/UserBundle/EventListener/CreateConfigListenerTest.php
Ensure language is valid
[github/wallabag/wallabag.git] / tests / Wallabag / UserBundle / EventListener / CreateConfigListenerTest.php
index 2b540fdfeb334c20bb64953a340ec1e2c3db6f24..c13bfbea9b6ae01a929f73282907c23aa024809d 100644 (file)
@@ -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();