]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - tests/Wallabag/CoreBundle/Twig/WallabagExtensionTest.php
Jump to Symfony 3.1
[github/wallabag/wallabag.git] / tests / Wallabag / CoreBundle / Twig / WallabagExtensionTest.php
diff --git a/tests/Wallabag/CoreBundle/Twig/WallabagExtensionTest.php b/tests/Wallabag/CoreBundle/Twig/WallabagExtensionTest.php
new file mode 100644 (file)
index 0000000..8ec2a75
--- /dev/null
@@ -0,0 +1,17 @@
+<?php
+
+namespace Tests\Wallabag\CoreBundle\Twig;
+
+use Wallabag\CoreBundle\Twig\WallabagExtension;
+
+class WallabagExtensionTest extends \PHPUnit_Framework_TestCase
+{
+    public function testRemoveWww()
+    {
+        $extension = new WallabagExtension();
+
+        $this->assertEquals('lemonde.fr', $extension->removeWww('www.lemonde.fr'));
+        $this->assertEquals('lemonde.fr', $extension->removeWww('lemonde.fr'));
+        $this->assertEquals('gist.github.com', $extension->removeWww('gist.github.com'));
+    }
+}