Skip to content

Commit

Permalink
Added test to cover the Slugify construct
Browse files Browse the repository at this point in the history
  • Loading branch information
acelaya committed Sep 26, 2014
1 parent b707292 commit 29e783f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/SlugifyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,19 @@ public function otherRegExpsProduceOtherResults()
$this->assertEquals($expected, $this->slugify->slugify($actual));
}

/**
* @test
* @covers Cocur\Slugify\Slugify::__construct()
*/
public function constructWithOtherRegexp()
{
$actual = 'File Name.tar.gz';
$expected = 'file-name.tar.gz';

$this->slugify = new SLugify('/([^a-z0-9.]|-)+/');
$this->assertEquals($expected, $this->slugify->slugify($actual));
}

public function provider()
{
return array(
Expand Down

0 comments on commit 29e783f

Please sign in to comment.