diff options
author | Jérémy Benoist <j0k3r@users.noreply.github.com> | 2019-05-29 11:14:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-29 11:14:00 +0200 |
commit | 73ec68b1ffafb792265a3805833e5cd84c966aed (patch) | |
tree | 33c6040c050f85c537f8dbf5e91d8c281db092cd /tests/Wallabag/CoreBundle/Twig/WallabagExtensionTest.php | |
parent | 2ba365c7c49556cd23b444dc3bb8d4a8cf08809d (diff) | |
parent | 2cbee36a0184786644470a84fdd8c720cfcac58e (diff) | |
download | wallabag-73ec68b1ffafb792265a3805833e5cd84c966aed.tar.gz wallabag-73ec68b1ffafb792265a3805833e5cd84c966aed.tar.zst wallabag-73ec68b1ffafb792265a3805833e5cd84c966aed.zip |
Merge pull request #3984 from wallabag/2.4
Merge 2.4 into master
Diffstat (limited to 'tests/Wallabag/CoreBundle/Twig/WallabagExtensionTest.php')
-rw-r--r-- | tests/Wallabag/CoreBundle/Twig/WallabagExtensionTest.php | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/Wallabag/CoreBundle/Twig/WallabagExtensionTest.php b/tests/Wallabag/CoreBundle/Twig/WallabagExtensionTest.php index bb92f745..39fcec16 100644 --- a/tests/Wallabag/CoreBundle/Twig/WallabagExtensionTest.php +++ b/tests/Wallabag/CoreBundle/Twig/WallabagExtensionTest.php | |||
@@ -32,6 +32,31 @@ class WallabagExtensionTest extends TestCase | |||
32 | $this->assertSame('gist.github.com', $extension->removeWww('gist.github.com')); | 32 | $this->assertSame('gist.github.com', $extension->removeWww('gist.github.com')); |
33 | } | 33 | } |
34 | 34 | ||
35 | public function testRemoveScheme() | ||
36 | { | ||
37 | $entryRepository = $this->getMockBuilder('Wallabag\CoreBundle\Repository\EntryRepository') | ||
38 | ->disableOriginalConstructor() | ||
39 | ->getMock(); | ||
40 | |||
41 | $tagRepository = $this->getMockBuilder('Wallabag\CoreBundle\Repository\TagRepository') | ||
42 | ->disableOriginalConstructor() | ||
43 | ->getMock(); | ||
44 | |||
45 | $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface') | ||
46 | ->disableOriginalConstructor() | ||
47 | ->getMock(); | ||
48 | |||
49 | $translator = $this->getMockBuilder('Symfony\Component\Translation\TranslatorInterface') | ||
50 | ->disableOriginalConstructor() | ||
51 | ->getMock(); | ||
52 | |||
53 | $extension = new WallabagExtension($entryRepository, $tagRepository, $tokenStorage, 0, $translator); | ||
54 | |||
55 | $this->assertSame('lemonde.fr', $extension->removeScheme('lemonde.fr')); | ||
56 | $this->assertSame('gist.github.com', $extension->removeScheme('gist.github.com')); | ||
57 | $this->assertSame('gist.github.com', $extension->removeScheme('https://gist.github.com')); | ||
58 | } | ||
59 | |||
35 | public function testRemoveSchemeAndWww() | 60 | public function testRemoveSchemeAndWww() |
36 | { | 61 | { |
37 | $entryRepository = $this->getMockBuilder('Wallabag\CoreBundle\Repository\EntryRepository') | 62 | $entryRepository = $this->getMockBuilder('Wallabag\CoreBundle\Repository\EntryRepository') |