From f622dec4e52f1c0dfb6bf215710886ffaf8d8570 Mon Sep 17 00:00:00 2001 From: kotas Date: Tue, 20 Jun 2017 10:03:45 +0200 Subject: [PATCH] Add test to validate word with accent --- tests/ProfaneValidatorTest.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/ProfaneValidatorTest.php b/tests/ProfaneValidatorTest.php index d93a3b2..9b714b9 100644 --- a/tests/ProfaneValidatorTest.php +++ b/tests/ProfaneValidatorTest.php @@ -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')