| Q |
A |
| php-code-coverage version |
9.2.15 |
| PHP version |
8.1.7 |
| Driver |
PCOV (same result in XDebug - Github actions |
| PCOV version (if used) |
1.0.11 |
| Installation Method |
Composer |
| Usage Method |
PHPUnit |
| PHPUnit version (if used) |
9.5.21 |
Hi,
I have an issue while collecting code coverage only when objects are constructed in @dataProvider method.

The code coverage will collect code coverage in test methods.
I'm constructing objects within the dataProvider to allow different "checks" based on "closure" I'm passing to the object.
Is this desired functionality?
Verification
Repository: https://github.com/wrk-flow/php-get-typed-value
vendor/bin/phpunit --coverage-text
If I add new test to ArrayTransformerTest file then the code coverage for ArrayTransformer is collected.
public function testCoverage(): void
{
$test = new ArrayTransformer(closure: fn () => []);
$this->assertNotNull($test);
}
```php
Hi,
I have an issue while collecting code coverage only when objects are constructed in
@dataProvidermethod.The code coverage will collect code coverage in test methods.
I'm constructing objects within the dataProvider to allow different "checks" based on "closure" I'm passing to the object.
Is this desired functionality?
Verification
Repository: https://github.com/wrk-flow/php-get-typed-value
If I add new test to
ArrayTransformerTestfile then the code coverage for ArrayTransformer is collected.