replace PHPUnit annotations with attributes (#5608)
This commit is contained in:
@@ -10,16 +10,14 @@
|
||||
namespace App\Tests\Timesheet;
|
||||
|
||||
use App\Timesheet\Util;
|
||||
use PHPUnit\Framework\Attributes\CoversClass;
|
||||
use PHPUnit\Framework\Attributes\DataProvider;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* @covers \App\Timesheet\Util
|
||||
*/
|
||||
#[CoversClass(Util::class)]
|
||||
class UtilTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @dataProvider getRateCalculationData
|
||||
*/
|
||||
#[DataProvider('getRateCalculationData')]
|
||||
public function testCalculateRate(int|float $hourlyRate, int $duration, int|float $expectedRate): void
|
||||
{
|
||||
self::assertEquals($expectedRate, Util::calculateRate($hourlyRate, $duration));
|
||||
|
||||
Reference in New Issue
Block a user