/** * @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); }
public function testToLowercase() { $instance = new Sanitizer('ÀÁÂÃÄÅ ABC 텍스트의 テスト часто הוא פשוט'); $instance->toLowercase(); $this->assertEquals('àáâãäå abc 텍스트의 テスト часто הוא פשוט', $instance); }