Add test to validate word with accent

This commit is contained in:
kotas 2017-06-20 10:03:45 +02:00
parent 645bbee51f
commit f622dec4e5
1 changed files with 12 additions and 0 deletions

View File

@ -124,6 +124,18 @@ class ProfaneValidatorTest extends PHPUnit_Framework_TestCase
$this->assertEquals($profane->getBadwords(), $expected);
}
public function test_can_validate_a_bad_word_with_accent()
{
$this->mockConfigs();
$profane = new ProfaneValidator();
$profane->setDictionary('sk');
$word = "piča";
$this->assertTrue( $profane->isProfane($word) );
}
private function mockConfigs()
{
Config::shouldReceive('get')