replace PHPUnit annotations with attributes (#5608)

This commit is contained in:
Kevin Papst
2025-08-11 18:57:42 +02:00
committed by GitHub
parent 04331420ae
commit 24778d3ffb
599 changed files with 1778 additions and 2313 deletions

View File

@@ -12,12 +12,13 @@ namespace App\Tests\Timesheet\Calculator;
use App\Entity\Timesheet;
use App\Tests\Mocks\RoundingServiceFactory;
use App\Timesheet\Calculator\DurationCalculator;
use App\Timesheet\RoundingService;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
/**
* @covers \App\Timesheet\Calculator\DurationCalculator
* @covers \App\Timesheet\RoundingService
*/
#[CoversClass(DurationCalculator::class)]
#[CoversClass(RoundingService::class)]
class DurationCalculatorTest extends TestCase
{
public function testCalculateWithEmptyEnd(): void
@@ -31,9 +32,7 @@ class DurationCalculatorTest extends TestCase
self::assertEquals(0, $record->getDuration());
}
/**
* @dataProvider getTestData
*/
#[DataProvider('getTestData')]
public function testCalculate($rules, $start, $end, $expectedDuration): void
{
$record = new Timesheet();