diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-10-01 15:58:26 +0200 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-10-01 16:03:50 +0200 |
commit | 1264029cd413a4e29642a219e2647d886f0de0d6 (patch) | |
tree | f257817f70c1169d442d4563a53533124ed28f94 /tests | |
parent | 114c55c0a6eade2ba6c53fe25f61cc58cca91620 (diff) | |
download | wallabag-1264029cd413a4e29642a219e2647d886f0de0d6.tar.gz wallabag-1264029cd413a4e29642a219e2647d886f0de0d6.tar.zst wallabag-1264029cd413a4e29642a219e2647d886f0de0d6.zip |
Add simple stats in footer
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Wallabag/CoreBundle/Twig/WallabagExtensionTest.php | 18 |
1 files changed, 17 insertions, 1 deletions
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 | |||
8 | { | 8 | { |
9 | public function testRemoveWww() | 9 | public function testRemoveWww() |
10 | { | 10 | { |
11 | $extension = new WallabagExtension(); | 11 | $entryRepository = $this->getMockBuilder('Wallabag\CoreBundle\Repository\EntryRepository') |
12 | ->disableOriginalConstructor() | ||
13 | ->getMock(); | ||
14 | |||
15 | $tagRepository = $this->getMockBuilder('Wallabag\CoreBundle\Repository\TagRepository') | ||
16 | ->disableOriginalConstructor() | ||
17 | ->getMock(); | ||
18 | |||
19 | $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface') | ||
20 | ->disableOriginalConstructor() | ||
21 | ->getMock(); | ||
22 | |||
23 | $translator = $this->getMockBuilder('Symfony\Component\Translation\TranslatorInterface') | ||
24 | ->disableOriginalConstructor() | ||
25 | ->getMock(); | ||
26 | |||
27 | $extension = new WallabagExtension($entryRepository, $tagRepository, $tokenStorage, 0, $translator); | ||
12 | 28 | ||
13 | $this->assertEquals('lemonde.fr', $extension->removeWww('www.lemonde.fr')); | 29 | $this->assertEquals('lemonde.fr', $extension->removeWww('www.lemonde.fr')); |
14 | $this->assertEquals('lemonde.fr', $extension->removeWww('lemonde.fr')); | 30 | $this->assertEquals('lemonde.fr', $extension->removeWww('lemonde.fr')); |