Stemmer/tests/StemmerTest.php
Протопопов Валерий 5f5c5b124b All methods are now static
- Restore original mb_internal_encoding after method call
- Add PHPUnit 5.0 to dev-deps
- dict.php wrapped into PHPUnit data provider
- Increased memory limit for tests
2017-11-07 15:12:47 +07:00

30 lines
653 B
PHP

<?php
/**
* This file is part of the RussianStemmer package
*
* (c) Alexander Kiryukhin
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code
*/
namespace NXP;
class StemmerTest extends \PHPUnit_Framework_TestCase
{
public function testStemmingDataProvider()
{
return require("dict.php");
}
/**
* @dataProvider testStemmingDataProvider
*
* @param string $word
* @param string $expected
*/
public function testStemming($word, $expected)
{
$this->assertEquals($expected, Stemmer::getWordBase($word));
}
}