add test for removeWww Twig Extension

This commit is contained in:
Nicolas Lœuillet
2015-10-06 06:34:11 +02:00
parent 8a60bc4cc2
commit 784bb4c38d
3 changed files with 21 additions and 4 deletions

View File

@ -0,0 +1,17 @@
<?php
namespace Wallabag\CoreBundle\Tests\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'));
}
}