diff --git a/tests/Bridge/Latte/SlugifyHelperTest.php b/tests/Bridge/Latte/SlugifyHelperTest.php new file mode 100644 index 00000000..dfadc9ca --- /dev/null +++ b/tests/Bridge/Latte/SlugifyHelperTest.php @@ -0,0 +1,37 @@ + + * @license http://www.opensource.org/licenses/MIT The MIT License + * @group unit + */ +class SlugifyHelperTest extends \PHPUnit_Framework_TestCase +{ + public function setUp() + { + $this->slugify = m::mock('Cocur\Slugify\SlugifyInterface'); + $this->helper = new SlugifyHelper($this->slugify); + } + + /** + * @test + * @covers Cocur\Slugify\Bridge\Latte\SlugifyHelper::slugify() + */ + public function slugify() + { + $this->slugify->shouldReceive('slugify')->with('hällo wörld', '_')->once()->andReturn('haello_woerld'); + + $this->assertEquals('haello_woerld', $this->helper->slugify('hällo wörld', '_')); + } +}