Esempio n. 1
0
 /**
  * @dataProvider textByLanguageProvider
  */
 public function testByLanguage($languageCode, $text, $expected)
 {
     $stopwordAnalyzer = new StopwordAnalyzer();
     $stopwordAnalyzer->loadListByLanguage($languageCode);
     $sanitizer = new Sanitizer($text);
     $sanitizer->toLowercase();
     $string = $sanitizer->sanitizeBy($stopwordAnalyzer);
     $this->assertEquals($expected, $string);
 }
Esempio n. 2
0
 public function testToLowercase()
 {
     $instance = new Sanitizer('ÀÁÂÃÄÅ ABC 텍스트의 テスト часто הוא פשוט');
     $instance->toLowercase();
     $this->assertEquals('àáâãäå abc 텍스트의 テスト часто הוא פשוט', $instance);
 }