From 1264029cd413a4e29642a219e2647d886f0de0d6 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Sat, 1 Oct 2016 15:58:26 +0200 Subject: Add simple stats in footer --- .../Wallabag/CoreBundle/Twig/WallabagExtensionTest.php | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'tests/Wallabag/CoreBundle/Twig/WallabagExtensionTest.php') diff --git a/tests/Wallabag/CoreBundle/Twig/WallabagExtensionTest.php b/tests/Wallabag/CoreBundle/Twig/WallabagExtensionTest.php index 8ec2a75a..b1c8c946 100644 --- a/tests/Wallabag/CoreBundle/Twig/WallabagExtensionTest.php +++ b/tests/Wallabag/CoreBundle/Twig/WallabagExtensionTest.php @@ -8,7 +8,23 @@ class WallabagExtensionTest extends \PHPUnit_Framework_TestCase { public function testRemoveWww() { - $extension = new WallabagExtension(); + $entryRepository = $this->getMockBuilder('Wallabag\CoreBundle\Repository\EntryRepository') + ->disableOriginalConstructor() + ->getMock(); + + $tagRepository = $this->getMockBuilder('Wallabag\CoreBundle\Repository\TagRepository') + ->disableOriginalConstructor() + ->getMock(); + + $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface') + ->disableOriginalConstructor() + ->getMock(); + + $translator = $this->getMockBuilder('Symfony\Component\Translation\TranslatorInterface') + ->disableOriginalConstructor() + ->getMock(); + + $extension = new WallabagExtension($entryRepository, $tagRepository, $tokenStorage, 0, $translator); $this->assertEquals('lemonde.fr', $extension->removeWww('www.lemonde.fr')); $this->assertEquals('lemonde.fr', $extension->removeWww('lemonde.fr')); -- cgit v1.2.3