|
14 | 14 | namespace Ergebnis\PHPUnit\SlowTestDetector\Test\Unit;
|
15 | 15 |
|
16 | 16 | use Ergebnis\DataProvider;
|
| 17 | +use Ergebnis\PHPUnit\SlowTestDetector\Count; |
17 | 18 | use Ergebnis\PHPUnit\SlowTestDetector\Exception;
|
18 |
| -use Ergebnis\PHPUnit\SlowTestDetector\MaximumCount; |
19 | 19 | use PHPUnit\Framework;
|
20 | 20 |
|
21 |
| -#[Framework\Attributes\CoversClass(MaximumCount::class)] |
22 |
| -#[Framework\Attributes\UsesClass(Exception\InvalidMaximumCount::class)] |
23 |
| -final class MaximumCountTest extends Framework\TestCase |
| 21 | +#[Framework\Attributes\CoversClass(Count::class)] |
| 22 | +#[Framework\Attributes\UsesClass(Exception\InvalidCount::class)] |
| 23 | +final class CountTest extends Framework\TestCase |
24 | 24 | {
|
25 | 25 | #[Framework\Attributes\DataProviderExternal(DataProvider\IntProvider::class, 'lessThanZero')]
|
26 | 26 | #[Framework\Attributes\DataProviderExternal(DataProvider\IntProvider::class, 'zero')]
|
27 | 27 | public function testFromIntRejectsInvalidValue(int $value): void
|
28 | 28 | {
|
29 |
| - $this->expectException(Exception\InvalidMaximumCount::class); |
| 29 | + $this->expectException(Exception\InvalidCount::class); |
30 | 30 |
|
31 |
| - MaximumCount::fromInt($value); |
| 31 | + Count::fromInt($value); |
32 | 32 | }
|
33 | 33 |
|
34 | 34 | #[Framework\Attributes\DataProviderExternal(DataProvider\IntProvider::class, 'greaterThanZero')]
|
35 |
| - public function testFromSecondsReturnsMaximumCount(int $value): void |
| 35 | + public function testFromIntReturnsCount(int $value): void |
36 | 36 | {
|
37 |
| - $maximumCount = MaximumCount::fromInt($value); |
| 37 | + $maximumCount = Count::fromInt($value); |
38 | 38 |
|
39 | 39 | self::assertSame($value, $maximumCount->toInt());
|
40 | 40 | }
|
|
0 commit comments