feat: adds phpunit 12.2.1 support

This commit is contained in:
Nuno Maduro
2025-06-08 15:29:23 +01:00
parent 02b1ffb334
commit 0fc9d4dfe0
12 changed files with 99 additions and 69 deletions

View File

@ -0,0 +1,12 @@
<?php
use PHPUnit\Framework\Attributes\CoversFunction;
function testCoversFunction() {}
it('uses the correct PHPUnit attribute for function', function () {
$attributes = (new ReflectionClass($this))->getAttributes();
expect($attributes[1]->getName())->toBe(CoversFunction::class);
expect($attributes[1]->getArguments()[0])->toBe('testCoversFunction');
})->coversFunction('testCoversFunction');