feat: upgrade phpunit to 12.5
This commit is contained in:
@@ -6,6 +6,7 @@ namespace App\Tests\Model;
|
||||
|
||||
use App\Model\ContingentCalendarQuery;
|
||||
use App\Model\ContingentPricesQuery;
|
||||
use PHPUnit\Framework\Attributes\DataProvider;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\Validator\Validation;
|
||||
|
||||
@@ -30,15 +31,13 @@ class ContingentQueryTest extends TestCase
|
||||
self::assertNull($query->dateToDate());
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider invalidCalendarQueries
|
||||
*/
|
||||
#[DataProvider('invalidCalendarQueries')]
|
||||
public function testCalendarQueryRejectsInvalidInput(ContingentCalendarQuery $query): void
|
||||
{
|
||||
self::assertGreaterThan(0, $this->validator()->validate($query)->count());
|
||||
}
|
||||
|
||||
public function invalidCalendarQueries(): iterable
|
||||
public static function invalidCalendarQueries(): iterable
|
||||
{
|
||||
yield 'normalized invalid date' => [new ContingentCalendarQuery('HOTEL', '2026-02-31', '2026-03-01')];
|
||||
yield 'reversed range' => [new ContingentCalendarQuery('HOTEL', '2026-03-02', '2026-03-01')];
|
||||
|
||||
Reference in New Issue
Block a user