X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2FWallabag%2FUserBundle%2FEventListener%2FCreateConfigListenerTest.php;h=c13bfbea9b6ae01a929f73282907c23aa024809d;hb=18460b2d79125d0252e7fe71e1ae84d5ef4f040a;hp=01796dedd4b7d95ce682b6616c3f336ec69b94e7;hpb=eef47c0ead8e7aa754f5160d077aaaa9f16937c9;p=github%2Fwallabag%2Fwallabag.git diff --git a/tests/Wallabag/UserBundle/EventListener/CreateConfigListenerTest.php b/tests/Wallabag/UserBundle/EventListener/CreateConfigListenerTest.php index 01796ded..c13bfbea 100644 --- a/tests/Wallabag/UserBundle/EventListener/CreateConfigListenerTest.php +++ b/tests/Wallabag/UserBundle/EventListener/CreateConfigListenerTest.php @@ -4,14 +4,17 @@ namespace Tests\Wallabag\UserBundle\EventListener; use FOS\UserBundle\Event\FilterUserResponseEvent; use FOS\UserBundle\FOSUserEvents; +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\EventListener\CreateConfigListener; use Wallabag\UserBundle\Entity\User; +use Wallabag\UserBundle\EventListener\CreateConfigListener; -class CreateConfigListenerTest extends \PHPUnit_Framework_TestCase +class CreateConfigListenerTest extends TestCase { private $em; private $listener; @@ -21,6 +24,7 @@ class CreateConfigListenerTest extends \PHPUnit_Framework_TestCase protected function setUp() { + $session = new Session(new MockArraySessionStorage()); $this->em = $this->getMockBuilder('Doctrine\ORM\EntityManager') ->disableOriginalConstructor() ->getMock(); @@ -33,7 +37,8 @@ class CreateConfigListenerTest extends \PHPUnit_Framework_TestCase 'fr', 1, 1, - 1 + 1, + $session ); $this->dispatcher = new EventDispatcher();