Skip to content

Commit 7e30701

Browse files
committed
tests: Use class-level @Covers annotation and clean up
Change-Id: I1f5d9afa4ca7934af0f6b077b5acb20337ecd92c
1 parent 9f3f805 commit 7e30701

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

tests/EvaluatorTest.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,15 @@
66

77
namespace CLDRPluralRuleParser\Test;
88

9+
use CLDRPluralRuleParser\Error;
910
use 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

Comments
 (0)