X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2FWallabag%2FUserBundle%2FEventListener%2FCreateConfigListenerTest.php;h=c13bfbea9b6ae01a929f73282907c23aa024809d;hb=4d4147b228ac90f329fd2d40dd4fb60cb980328a;hp=2b540fdfeb334c20bb64953a340ec1e2c3db6f24;hpb=be417ef23685e17a239b1d192a0e9b9f484f1bfe;p=github%2Fwallabag%2Fwallabag.git diff --git a/tests/Wallabag/UserBundle/EventListener/CreateConfigListenerTest.php b/tests/Wallabag/UserBundle/EventListener/CreateConfigListenerTest.php index 2b540fdf..c13bfbea 100644 --- a/tests/Wallabag/UserBundle/EventListener/CreateConfigListenerTest.php +++ b/tests/Wallabag/UserBundle/EventListener/CreateConfigListenerTest.php @@ -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();