Skip to content

Commit

Permalink
Added Latte test
Browse files Browse the repository at this point in the history
  • Loading branch information
lookyman committed Mar 17, 2015
1 parent 5d48927 commit 89b7def
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions tests/Bridge/Latte/SlugifyHelperTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php

namespace Cocur\Slugify\Bridge\Latte;

use Cocur\Slugify\Bridge\Latte\SlugifyHelper;
use \Mockery as m;


/**
* SlugifyHelperTest
*
* @category test
* @package cocur/slugify
* @subpackage bridge
* @author Lukáš Unger <[email protected]>
* @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', '_'));
}
}

0 comments on commit 89b7def

Please sign in to comment.