public function testSanitizeByStopwords() { $instance = new Sanitizer('Foo bar foobar'); $stopwordAnalyzer = new StopwordAnalyzer(); $stopwordAnalyzer->setCustomStopwordList(array('zh' => array('bar'))); $this->assertEquals('Foo foobar', $instance->sanitizeBy($stopwordAnalyzer)); }
public function testCustomStopwordList() { $instance = new StopwordAnalyzer(); $instance->setCustomStopwordList(array('zoo' => array('Foo'))); $this->assertTrue($instance->isStopWord('Foo')); }