1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-08-01 17:38:38 +00:00

Add simple stats in footer

This commit is contained in:
Jeremy Benoist 2016-10-01 15:58:26 +02:00
parent 114c55c0a6
commit 1264029cd4
No known key found for this signature in database
GPG key ID: BCA73962457ACC3C
15 changed files with 82 additions and 5 deletions

View file

@ -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'));