66
77namespace CLDRPluralRuleParser \Test ;
88
9+ use CLDRPluralRuleParser \Error ;
910use CLDRPluralRuleParser \Evaluator ;
11+ use PHPUnit \Framework \TestCase ;
1012
11- class EvaluatorTest extends \PHPUnit \Framework \TestCase {
13+ /**
14+ * @covers \CLDRPluralRuleParser\Evaluator
15+ */
16+ class EvaluatorTest extends TestCase {
1217 /**
13- * @covers CLDRPluralRuleParser\Evaluator::evaluate
1418 * @dataProvider provideValidCases
1519 */
1620 public function testValidRules ( $ expected , $ rules , $ number , $ comment ) {
@@ -19,15 +23,14 @@ public function testValidRules( $expected, $rules, $number, $comment ) {
1923 }
2024
2125 /**
22- * @covers CLDRPluralRuleParser\Evaluator::evaluate
2326 * @dataProvider provideInvalidCases
2427 */
2528 public function testInvalidRules ( $ rules , $ comment ) {
26- $ this ->expectException ( \ CLDRPluralRuleParser \ Error::class );
29+ $ this ->expectException ( Error::class );
2730 Evaluator::evaluate ( 1 , (array )$ rules );
2831 }
2932
30- public static function provideValidCases () {
33+ public static function provideValidCases (): array {
3134 return [
3235 # expected, rule, number, comment
3336 [ 0 , 'n is 1 ' , 1 , 'integer number and is ' ],
@@ -139,7 +142,7 @@ public static function provideValidCases() {
139142 ];
140143 }
141144
142- public static function provideInvalidCases () {
145+ public static function provideInvalidCases (): array {
143146 return [
144147 [ 'n mod mod 5 is 1 ' , 'mod mod ' ],
145148 [ 'n ' , 'just n ' ],
0 commit comments