public function Porter2Pecl1::testStem in Porter-Stemmer 8
Test PECL stem_english() with a data provider method.
Uses the data provider method to test with a wide range of words/stems.
@dataProvider stemDataProvider
File
- tests/
src/ Unit/ Porter2Pecl1.php, line 21
Class
- Porter2Pecl1
- Tests the "PorterStemmer" implementation with PECL stem_english().
Namespace
Drupal\Tests\porterstemmer\UnitCode
public function testStem($word, $stem) {
if ($this->hasPeclStem) {
$this
->assertEquals($stem, stem_english($word));
}
else {
$this
->markTestSkipped('No PECL stem library found, Aborting test.');
}
}