Files
pest/tests/Features/Covers/FunctionCoverage.php
2025-06-08 15:29:23 +01:00

13 lines
410 B
PHP

<?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');